From 43e860a725a238039ac4d7f07de38ffd86b812a1 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Wed, 23 Sep 2020 22:26:13 +0300 Subject: fix mailsync script --- dotfiles/.local/bin/mailsync | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'dotfiles/.local/bin') 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. -- cgit v1.2.3