summaryrefslogtreecommitdiffstats
path: root/.local/bin/fetch_mail.sh
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-08-17 14:37:44 +0200
committerJoe <bousset.rudy@gmail.com>2022-08-17 14:37:44 +0200
commit9addbecbf31bab7088d3089a99964eeb3c6c7928 (patch)
treebfb42318b4495c88eb7883180661bf53cc9e0a8c /.local/bin/fetch_mail.sh
parentupdate (diff)
downloaddotfiles-bsd-9addbecbf31bab7088d3089a99964eeb3c6c7928.tar.gz
dotfiles-bsd-9addbecbf31bab7088d3089a99964eeb3c6c7928.tar.bz2
dotfiles-bsd-9addbecbf31bab7088d3089a99964eeb3c6c7928.tar.xz
dotfiles-bsd-9addbecbf31bab7088d3089a99964eeb3c6c7928.tar.zst
dotfiles-bsd-9addbecbf31bab7088d3089a99964eeb3c6c7928.zip
update
Diffstat (limited to '')
-rwxr-xr-x.local/bin/fetch_mail.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/.local/bin/fetch_mail.sh b/.local/bin/fetch_mail.sh
index 8eb91e7..a0d6694 100755
--- a/.local/bin/fetch_mail.sh
+++ b/.local/bin/fetch_mail.sh
@@ -1,8 +1,17 @@
#!/bin/sh
+set -m
+
export GNUPGHOME=/home/jozan/.local/share/gnupg
export PASSWORD_STORE_DIR=/home/jozan/.local/share/pass
killall mbsync >/dev/null 2>&1
notify-send -u low -t 3000 'mbsync' ' fetching mail...' >/dev/null 2>&1
-mbsync -q -a -c /usr/home/jozan/.config/mbsync/mbsyncrc || notify-send -u low -t 6000 'mbsync' ' failed to fetch mail' >/dev/null 2>&1
+{
+ mbsync -q -a -c /usr/home/jozan/.config/mbsync/mbsyncrc ||
+ notify-send -u low -t 6000 'mbsync' ' failed to fetch mail' >/dev/null 2>&1 &&
+ (sleep 1; kill -74 $(pidof dwmblocks) >/dev/null 2>&1)
+}&
+gsleep 0.2
+kill -74 $(pidof dwmblocks) >/dev/null 2>&1
+fg