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.

23 lines
572 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. if [ "$IDENTIFIER" = "unicode" ]; then
  9. if [ "$MAILBOX" -eq 0 ]; then
  10. printf "[📪 %s]\n" "$MAILBOX"
  11. else
  12. printf "[📫 %s]\n" "$MAILBOX"
  13. fi
  14. else
  15. printf "[MAI %s]\n" "$MAILBOX"
  16. fi
  17. }
  18. dwm_mail