AutoYADM commit: 2025-03-17 23:15:07
This commit is contained in:
parent
f5b3ffcde5
commit
f03d12c69c
5 changed files with 17 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/bin/env bash
|
||||
|
||||
/home/fic/.config/mail/mail-sync.sh &
|
||||
# nohup /home/fic/.config/mail/mail-sync.sh >/dev/null 2>&1 &
|
||||
# exit 0
|
||||
# exec /home/fic/.config/mail/mail-sync.sh &
|
||||
nohup /home/fic/.config/mail/mail-sync.sh >/dev/null 2>&1 &
|
||||
exit 0
|
||||
|
|
|
@ -13,16 +13,17 @@ PIPE="/tmp/email_refresh_pipe"
|
|||
# fi
|
||||
|
||||
# mailboxes to monitor
|
||||
MAILBOXES=("personal" "school")
|
||||
# MAILBOXES=("personal" "school")
|
||||
# Get unread counts and format for waybar
|
||||
get_unread_counts() {
|
||||
for mailbox in "${MAILBOXES[@]}"; do
|
||||
count=$(notmuch count --output=messages "tag:unread and path:$mailbox/**")
|
||||
printf "%s: %s " "$mailbox" "$count"
|
||||
done
|
||||
# for mailbox in "${MAILBOXES[@]}"; do
|
||||
pcount=$(notmuch count --output=messages "tag:unread and path:personal/**")
|
||||
scount=$(notmuch count --output=messages "tag:unread and path:school/**")
|
||||
# printf "%s: %s " "$mailbox" "$count"
|
||||
# done
|
||||
# we print a newline to let waybar know to display
|
||||
# what we just printed
|
||||
printf "|\n"
|
||||
echo "p: $pcount s: $scount |"
|
||||
}
|
||||
|
||||
# run once for initial output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue