dotfiles

My dotfiles used for LARBS
Log | Files | Refs | README | LICENSE

commit 6c200b8850faf51a4d594b3148d3f3913149822b
parent 2b5df860ded1412a0c0be0d140d138616e926dfc
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Sat,  8 Feb 2020 19:28:25 -0500

mailbox icon moved to script

Diffstat:
M.config/i3blocks/config | 1-
M.local/bin/statusbar/mailbox | 6+++++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/.config/i3blocks/config b/.config/i3blocks/config @@ -34,7 +34,6 @@ interval=18000 signal=5 [mailbox] -label=📬 interval=180 signal=12 diff --git a/.local/bin/statusbar/mailbox b/.local/bin/statusbar/mailbox @@ -13,4 +13,8 @@ case $BLOCK_BUTTON in - Middle click syncs mail" ;; esac -echo "$(du -a ~/.local/share/mail/*/INBOX/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)" +unread="$(find ~/.local/share/mail/*/INBOX/new/* -type f | wc -l 2>/dev/null)" + +icon="$(cat "/tmp/imapsyncicon_$USER")" + +[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "📬 $unread$(cat "/tmp/imapsyncicon_$USER" 2>/dev/null)"