AutoYADM commit: 2025-03-17 22:30:07
This commit is contained in:
parent
a910267105
commit
0e26e9f3fa
7 changed files with 27 additions and 17 deletions
|
@ -1 +1 @@
|
|||
config##hostname.dpad
|
||||
config##hostname.dbox
|
|
@ -9,17 +9,17 @@ configurations:
|
|||
username: daniel@ficd.ca
|
||||
passwordCMD: 'pass show proton/bridge'
|
||||
xoAuth2: false
|
||||
onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
onDeletedMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
# onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
# onDeletedMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
wait: 20
|
||||
boxes:
|
||||
-
|
||||
mailbox: INBOX
|
||||
onNewMail: '/home/fic/.config/mail/newmail.sh personal'
|
||||
# onNewMail: '/home/fic/.config/mail/newmail.sh personal'
|
||||
|
||||
-
|
||||
mailbox: Sent
|
||||
onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
# onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
-
|
||||
host: outlook.office365.com
|
||||
port: 993
|
||||
|
@ -30,12 +30,12 @@ configurations:
|
|||
username: 18daf3@queensu.ca
|
||||
passwordCMD: '~/tools/mutt_oauth2.py ~/tools/tokenfile-test'
|
||||
xoAuth2: true
|
||||
onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
onDeletedMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
# onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
# onDeletedMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
wait: 20
|
||||
boxes:
|
||||
- mailbox: INBOX
|
||||
onNewMail: '/home/fic/.config/mail/newmail.sh school'
|
||||
# onNewMail: '/home/fic/.config/mail/newmail.sh school'
|
||||
-
|
||||
mailbox: Sent Items
|
||||
onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
# onNewMail: '/home/fic/.config/mail/mail-sync.sh'
|
||||
|
|
|
@ -1 +1 @@
|
|||
kitty.conf##hostname.dpad
|
||||
kitty.conf##hostname.dbox
|
|
@ -5,9 +5,11 @@ MAILBOXES=("personal" "school")
|
|||
# named pipe for receiving refresh events
|
||||
# from mail sync script
|
||||
PIPE="/tmp/email_refresh_pipe"
|
||||
COUNT="/tmp/email_count"
|
||||
|
||||
# Create pipe if doesn't exist
|
||||
[[ -p "$PIPE" ]] || mkfifo "$PIPE"
|
||||
[[ -e "$COUNT" ]] || echo "0" > "$COUNT"
|
||||
|
||||
# Get unread counts and format for waybar
|
||||
get_unread_counts() {
|
||||
|
@ -22,13 +24,21 @@ get_unread_counts() {
|
|||
|
||||
|
||||
# run once for initial output
|
||||
get_unread_counts
|
||||
echo "mail init"
|
||||
# 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
|
||||
PAYLOAD=$(cat /tmp/email_refresh_pipe)
|
||||
if [ "$PAYLOAD" == "new" ]; then
|
||||
count=$(cat "$COUNT")
|
||||
((count++)) > "$COUNT"
|
||||
elif [ "$PAYLOAD" == "reset" ]; then
|
||||
"0" > "$COUNT"
|
||||
elif [ "$PAYLOAD" == "show_precise" ]; then
|
||||
get_unread_counts
|
||||
elif [ "$PAYLOAD" == "show_since" ]; then
|
||||
echo "new: $(cat "$COUNT")"
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/env bash
|
||||
|
||||
notify-send "New mail in $1 inbox!"
|
||||
/home/fic/.config/mail/mail-sync.sh
|
||||
# /home/fic/.config/mail/mail-sync.sh
|
||||
|
|
|
@ -1 +1 @@
|
|||
config.kdl##hostname.dpad
|
||||
config.kdl##hostname.dbox
|
|
@ -1 +1 @@
|
|||
config##hostname.dpad
|
||||
config##hostname.dbox
|
Loading…
Add table
Add a link
Reference in a new issue