aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdotfiles/.local/bin/mailsync8
1 files changed, 3 insertions, 5 deletions
diff --git a/dotfiles/.local/bin/mailsync b/dotfiles/.local/bin/mailsync
index 7c644f6..42b8079 100755
--- a/dotfiles/.local/bin/mailsync
+++ b/dotfiles/.local/bin/mailsync
@@ -9,14 +9,14 @@ notmuchrc="$HOME/.config/notmuchrc"
mbsyncrc="$HOME/.config/mbsyncrc"
# Run only if user logged in (prevent cron errors)
-w | grep "^$USER\W" >/dev/null || exit
+# w | grep "^$USER\W" >/dev/null || exit
# Don't run if screen is locked (gpg key is locked too)
-pidof swaylock && exit
+# pidof swaylock && exit
# Check several times before giving up, useful when just waking up from sleep
# since internet is usually not available right away
-wget -q --tries=3 --timeout=20 --spider 1.1.1.1 > /dev/null || exit
+wget -q --tries=3 --timeout=20 --spider http://1.1.1.1 > /dev/null || exit
thereis=0
@@ -40,11 +40,9 @@ done
if [ $thereis = 1 ]; then
mpv --keep-open=no --really-quiet "$HOME/.local/share/soundalerts/mail.ogg"
- killall -43 waybar
fi
notmuch -c "$notmuchrc" new 2>/dev/null
# Create a touch file that indicates the time of the last run of mailsync
touch "$HOME/.cache/lastmailsync"
-