Configuration file for dwm-bar on macbook air
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
610 B

  1. #!/bin/sh
  2. # A dwm_bar function to display the number of emails in an inbox
  3. # Joe Standring <git@joestandring.com>
  4. # GNU GPLv3
  5. # To count mail in an inbox, change "/path/to/inbox" below to the location of your inbox. For example, "/home/$USER/.mail/new"
  6. dwm_mail () {
  7. MAILBOX=$(ls /path/to/inbox | wc -l)
  8. printf "%s" "$SEP1"
  9. if [ "$IDENTIFIER" = "unicode" ]; then
  10. if [ "$MAILBOX" -eq 0 ]; then
  11. printf "📪 %s" "$MAILBOX"
  12. else
  13. printf "📫 %s" "$MAILBOX"
  14. fi
  15. else
  16. printf "MAI %s" "$MAILBOX"
  17. fi
  18. printf "%s\n" "$SEP2"
  19. }
  20. dwm_mail