sb

shitty bar for dwm
git clone git://git.ckyln.com/~cem/sb.git
Log | Files | Refs | README | LICENSE

sb_mail (302B)


      1 # counts the number of items in the given directory
      2 # $1 New Mail Directory
      3 # $2 Account Name
      4 
      5 mail() {
      6     [ -z "$1" ] && printf "Maildir is not set\\n" >&2 && return 1
      7     count="$(find "$1" | wc -l)" ; [ "$count" -gt 1 ] &&
      8         printf '%s: %s %s ' "${2:-Mail}" "$(( count - 1 ))" "$DELIMITER"
      9 }