aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin')
-rwxr-xr-xdotfiles/.local/bin/mailsync10
1 files changed, 5 insertions, 5 deletions
diff --git a/dotfiles/.local/bin/mailsync b/dotfiles/.local/bin/mailsync
index 2c70f27..0435c7c 100755
--- a/dotfiles/.local/bin/mailsync
+++ b/dotfiles/.local/bin/mailsync
@@ -1,9 +1,12 @@
#!/bin/sh
# Sync mail and give notification if there is new mail.
+# Source the needed env variables so that it can function properly from cron
+. ~/.cache/sessionenv
+
# Config files
-notmuchrc="$XDG_CONFIG_HOME/notmuchrc"
-mbsyncrc="$XDG_CONFIG_HOME/mbsyncrc"
+notmuchrc="$HOME/.config/notmuchrc"
+mbsyncrc="$HOME/.config/mbsyncrc"
# Run only if user logged in (prevent cron errors)
w | grep "^$USER\W" >/dev/null || exit
@@ -15,9 +18,6 @@ pidof swaylock && exit
# since internet is usually not available right away
wget -q --tries=3 --timeout=20 --spider 1.1.1.1 > /dev/null || exit
-# Source the needed env variables so that it can function properly from cron
-. ~/.cache/sessionenv
-
thereis=0
# Run mbsync. You can feed this script different settings.