From b2db4b385143c4a88b93fa1d80d38a67bcde8e59 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 8 Aug 2024 09:30:21 +0200 Subject: mailsync: clean notification sources and remove comments --- .local/bin/mailsync | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to '.local/bin/mailsync') diff --git a/.local/bin/mailsync b/.local/bin/mailsync index cc7010b..40a2dee 100755 --- a/.local/bin/mailsync +++ b/.local/bin/mailsync @@ -37,8 +37,8 @@ if [ "$(uname)" = "Darwin" ]; then notify() { osascript -e "display notification \"$2 in $1\" with title \"You've got Mail\" subtitle \"Account: $account\"" && sleep 2; } messageinfo() { osascript -e "display notification with title \"📧 $from\" subtitle \"$subject\""; } else - notify() { notify-send --icon="mail_new" --app-name="excerpt" "\`$1\`" "📬 $2 new mail(s)"; } - messageinfo() { notify-send --icon="mail-mark-unread" --app-name="mutt" "📧 $from" "$subject"; } + notify() { notify-send --icon="mail_new" --app-name="mailsync" "\`$1\`" "📬 $2 new mail(s)"; } + messageinfo() { notify-send --icon="mail-mark-unread" --app-name="mailsync" "📧 $from" "$subject"; } fi # Check account for new mail. Notify if there is new content. @@ -60,7 +60,7 @@ syncandnotify() { # Sync accounts passed as argument or all. if [ "$#" -eq "0" ]; then - accounts="$(awk '/^Channel/ {print $2}' "$HOME/.mbsyncrc")" + accounts="$(awk '/^Channel/ {print $2}' "$HOME/.config/isyncrc")" else for arg in "$@"; do [ "${arg%${arg#?}}" = '-' ] && opts="${opts:+${opts} }${arg}" && shift 1 @@ -68,15 +68,12 @@ else accounts=$* fi -# ( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null - # Parallelize multiple accounts for account in $accounts; do syncandnotify & done wait -# ( kill -46 "$(pidof "${STATUSBAR:-dwmblocks}")" >/dev/null 2>&1 ) 2>/dev/null notmuch new 2> /dev/null -- cgit v1.2.3-70-g09d2