waybar_mail.sh - dotfiles - These are my dotfiles. There are many like it, but these are mine.
(HTM) git clone git://jay.scot/dotfiles
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
waybar_mail.sh (253B)
---
1 #!/bin/sh
2
3 maildirnew="$HOME/.mail/jay/Inbox/new/"
4 new="$(find $maildirnew -type f | wc -l)"
5
6 if [ $new -gt 0 ]
7 then
8 echo "{\"text\":\"$new\",\"tooltip\":\"$new Mail\",\"class\":\"new\"}"
9 else
10 echo '{"text":"No new mail","tooltip":"","class":""}'
11 fi
12