dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

mailbox (531B)


      1 #!/usr/bin/env sh
      2 
      3 # i3blocks mail module.
      4 # Displays number of unread mail and an loading icon if updating.
      5 # When clicked, brings up `neomutt`.
      6 
      7 case $BLOCK_BUTTON in
      8 	1) "$TERMINAL" -e neomutt ;;
      9 	2) setsid mailsync >/dev/null & ;;
     10 	3) pgrep -x dunst >/dev/null && notify-send "📬 Mail module" "\- Shows unread mail
     11 - Shows 🔃 if syncing mail
     12 - Left click opens neomutt
     13 - Middle click syncs mail" ;;
     14 esac
     15 
     16 echo "$(du -a ~/.local/share/mail/*/INBOX/new/* 2>/dev/null | sed -n '$=')$(cat /tmp/imapsyncicon_$USER 2>/dev/null)"