Even more updates

This commit is contained in:
Alexander Rosenberg 2023-05-26 15:15:07 -07:00
parent 2dec159f8a
commit 2111b7f937
Signed by: Zander671
GPG Key ID: 5FD0394ADBD72730
4 changed files with 1 additions and 22 deletions

View File

@ -100,7 +100,7 @@
0 (msg.tag "-unread")
1 (do
(setv global-did-delete True)
(msg.tag "-unread")
(msg.tag "-unread" "+deleted")
(msg.move "Trash")))))
(let [mail-root (get (notmuch "config" "get" "database.mail_root"
@ -117,5 +117,4 @@
(notmuch "tag" "-notnotified" "*")
(when global-did-delete
(notmuch "tag" "+deleted" "folder:Trash")
(notmuch "new" "--no-hooks"))

View File

@ -1,6 +1,5 @@
#!/usr/bin/env zsh
~/scripts/notmuch-pre.sh
mbsync -a
notmuch new
~/scripts/notmuch-post.sh

View File

@ -9,5 +9,3 @@ notmuch tag +spam folder:Spam
notmuch tag -starred not folder:Starred
hy ~/scripts/notify-mail.hy
notmuch tag +deleted folder:Trash

View File

@ -1,17 +0,0 @@
#!/usr/bin/env zsh
local mail_root="$(notmuch config get database.mail_root)"
# copy-by-query <dest> [query...]
copy-by-query() {
for old_file in $(notmuch search --output=files not folder:Starred \
and not folder:Sent \
and not folder:Drafts \
and not folder:"${1}" and ${@:2}); do
local name="$(basename "${old_file}")"
local new_file="${mail_root}/${1}/cur/${name}"
cp "${old_file}" "${new_file}"
done
}
copy-by-query Starred tag:starred