AutoYADM commit: 2025-03-15 17:30:07

This commit is contained in:
Daniel Fichtinger 2025-03-15 17:30:07 -04:00
parent 7b4a6206ea
commit 64ae7b13eb
3 changed files with 13 additions and 1 deletions

View file

@ -1,5 +1,10 @@
#!/bin/sh #!/bin/sh
PIPE="/tmp/email_refresh_pipe"
# Create pipe if doesn't exist
[ -p "$PIPE" ] || mkfifo "$PIPE"
MBSYNC=$(pgrep mbsync) MBSYNC=$(pgrep mbsync)
NOTMUCH=$(pgrep notmuch) NOTMUCH=$(pgrep notmuch)
@ -11,7 +16,13 @@ fi
echo "Deleting messages tagged as *deleted*" echo "Deleting messages tagged as *deleted*"
notmuch search --format=text0 --output=files tag:deleted | xargs -0 --no-run-if-empty rm -v notmuch search --format=text0 --output=files tag:deleted | xargs -0 --no-run-if-empty rm -v
# sync mailbox with external servers
mbsync -Va mbsync -Va
# apply tag:new to new mail
notmuch new notmuch new
# new mail tagging pipeline
afew --tag --new afew --tag --new
# signal waybar indicator update
echo "refresh" > "$PIPE"
# generate new ranked addressbook
maildir-rank-addr maildir-rank-addr

View file

@ -12,7 +12,7 @@
"niri/window" "niri/window"
], ],
"modules-right": [ "modules-right": [
// "custom/mail", "custom/mail",
"cpu", "cpu",
"custom/delim", "custom/delim",
"memory", "memory",

View file

@ -7,3 +7,4 @@ zsh -ic 'ya pack -a yazi-rs/plugins:git;exit'
zsh -ic 'ya pack -a Rolv-Apneseth/starship;exit' zsh -ic 'ya pack -a Rolv-Apneseth/starship;exit'
zsh -ic 'mksh newmail;exit' zsh -ic 'mksh newmail;exit'
zsh -ic 'mksh mail-indicator;exit' zsh -ic 'mksh mail-indicator;exit'
zsh -ic 'mksh async;exit'