updated maildir config
This commit is contained in:
parent
ea9b3c08e4
commit
67974e51af
4 changed files with 47 additions and 0 deletions
4
.config/mail/async-mail.sh
Executable file
4
.config/mail/async-mail.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
nohup /home/fic/.config/mail/mail-sync.sh >/dev/null 2>&1 &
|
||||||
|
exit 0
|
5
.config/mail/attach-picker.sh
Executable file
5
.config/mail/attach-picker.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
TEMP=$1
|
||||||
|
# foot "yazi --chooser-file '$TEMP'"
|
||||||
|
footclient yazi --chooser-file "$TEMP"
|
34
.config/mail/mail-indicator.sh
Executable file
34
.config/mail/mail-indicator.sh
Executable file
|
@ -0,0 +1,34 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
# mailboxes to monitor
|
||||||
|
MAILBOXES=("personal" "school")
|
||||||
|
# named pipe for receiving refresh events
|
||||||
|
# from mail sync script
|
||||||
|
PIPE="/tmp/email_refresh_pipe"
|
||||||
|
|
||||||
|
# Create pipe if doesn't exist
|
||||||
|
[[ -p "$PIPE" ]] || mkfifo "$PIPE"
|
||||||
|
|
||||||
|
# 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
|
||||||
|
# we print a newline to let waybar know to display
|
||||||
|
# what we just printed
|
||||||
|
printf "|\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# run once for initial output
|
||||||
|
get_unread_counts
|
||||||
|
# begin event loop
|
||||||
|
while true; do
|
||||||
|
# cat blocks until data comes through pipe
|
||||||
|
# redirecting to null b.c. we don't want the
|
||||||
|
# pipe's contents to be printed to stdout
|
||||||
|
cat /tmp/email_refresh_pipe > /dev/null
|
||||||
|
# print unread indicator to stdout
|
||||||
|
get_unread_counts
|
||||||
|
done
|
4
.config/mail/newmail.sh
Executable file
4
.config/mail/newmail.sh
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/env bash
|
||||||
|
|
||||||
|
notify-send "New mail in $1 inbox!"
|
||||||
|
/home/fic/.config/mail/mail-sync.sh
|
Loading…
Add table
Add a link
Reference in a new issue