From 736b78d04e4f69d64c73a52574d76f840b96d9fc Mon Sep 17 00:00:00 2001 From: JameyBear Date: Sun, 31 May 2020 10:49:06 -0400 Subject: [PATCH] Little Fixes --- bin/mailsync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/mailsync b/bin/mailsync index 6aeb946..6128f41 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -12,7 +12,7 @@ ping -q -c 1 1.1.1.1 > /dev/null || { echo "No internet connection detected."; e command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotify-send\` should be installed for pop-up mail notifications with this script." # Required to display notifications if run as a cronjob: -DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus +export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus export DISPLAY=:0.0 # For individual configurations: @@ -30,7 +30,7 @@ fi # Check account for new mail. Notify if there is new content. syncandnotify() { acc="$(echo "$account" | sed "s/.*\///")" - mbsync $opts "$acc" + mbsync "$opts" "$acc" new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) if [ "$newcount" -gt "0" ]; then