Signed-off-by: Marcin Wozniak <y0rune@aol.com>
This commit is contained in:
2020-05-09 14:08:47 +02:00
committed by Marcin Wozniak
parent e53c625e08
commit 3765f00fff
10 changed files with 158 additions and 1888 deletions

View File

@ -1,26 +0,0 @@
#!/usr/bin/env sh
# Sync mail and give notification if there is new mail.
# Checks for internet connection and set notification script.
ping -q -c 1 1.1.1.1 > /dev/null || exit
command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotify-send\` should be installed for pop-up mail notifications with this script."
export DISPLAY=:0.0
# IKONKA SYNC ##echo " 🔃" > /tmp/imapsyncicon_$USER
pkill -RTMIN+12 i3blocks
# Run mbsync. You can feed this script different settings.
mbsync -a
# IKONKA SYNC #rm -f /tmp/imapsyncicon_$USER
pkill -RTMIN+12 i3blocks
RESULT=$(echo "$(du -a ~/.mailbox/*/inbox/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)")
#if [ -z $RESULT ]; then
# echo ""
#else
# notify-send "mutt-wizard" "📬 new mail(s)"
#fi
#Create a touch file that indicates the time of the last run of mailsync
touch "$HOME/.mutt/.mailsynclastrun"