diff options
author | Yaroslav <contact@yaroslavps.com> | 2020-09-23 22:26:13 +0300 |
---|---|---|
committer | Yaroslav <contact@yaroslavps.com> | 2020-09-23 22:26:13 +0300 |
commit | 43e860a725a238039ac4d7f07de38ffd86b812a1 (patch) | |
tree | df3bc298af1c2298041c1f3fce2b880713f88d0d /dotfiles/.local/bin/mailsync | |
parent | c70a2840b7fcd400248b1bcc5857992acdadcae2 (diff) | |
download | swayrice-43e860a725a238039ac4d7f07de38ffd86b812a1.tar.gz swayrice-43e860a725a238039ac4d7f07de38ffd86b812a1.zip |
fix mailsync script
Diffstat (limited to 'dotfiles/.local/bin/mailsync')
-rwxr-xr-x | dotfiles/.local/bin/mailsync | 10 |
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. |