dwm-bar for archlinux
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
533 B

  1. #!/bin/sh
  2. # A dwm_bar function to show the closest appointment in calcurse
  3. # Joe Standring <git@joestandring.com>
  4. # GNU GPLv3
  5. # Dependencies: calcurse
  6. dwm_ccurse () {
  7. APPOINTMENT=$(calcurse -a | head -n 3 | tr -d '\n+>-' | awk '$1=$1' | sed 's/://')
  8. if [ "$APPOINTMENT" != "" ]; then
  9. printf "%s" "$SEP1"
  10. if [ "$IDENTIFIER" = "unicode" ]; then
  11. printf "💡 %s" "$APPOINTMENT"
  12. else
  13. printf "APT %s" "$APPOINTMENT"
  14. fi
  15. printf "%s\n" "$SEP2"
  16. fi
  17. }
  18. dwm_ccurse