aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local
diff options
context:
space:
mode:
authorYaroslav <contact@yaroslavps.com>2020-09-23 22:26:13 +0300
committerYaroslav <contact@yaroslavps.com>2020-09-23 22:26:13 +0300
commit43e860a725a238039ac4d7f07de38ffd86b812a1 (patch)
treedf3bc298af1c2298041c1f3fce2b880713f88d0d /dotfiles/.local
parentc70a2840b7fcd400248b1bcc5857992acdadcae2 (diff)
downloadswayrice-43e860a725a238039ac4d7f07de38ffd86b812a1.tar.gz
swayrice-43e860a725a238039ac4d7f07de38ffd86b812a1.zip
fix mailsync script
Diffstat (limited to 'dotfiles/.local')
-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.