dotfiles

Torpy's handcrafted dootfiles.
Log | Files | Refs | README

sb-clock (807B)


      1 #!/bin/sh
      2 
      3 clock=$(date '+%I')
      4 
      5 case "$clock" in
      6 	"00") icon="" ;;
      7 	"01") icon="" ;;
      8 	"02") icon="" ;;
      9 	"03") icon="" ;;
     10 	"04") icon="" ;;
     11 	"05") icon="" ;;
     12 	"06") icon="" ;;
     13 	"07") icon="" ;;
     14 	"08") icon="" ;;
     15 	"09") icon="" ;;
     16 	"10") icon="" ;;
     17 	"11") icon="" ;;
     18 	"12") icon="" ;;
     19 esac
     20 
     21 case $BLOCK_BUTTON in
     22 	1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e'|tr -d ' ')\>/<b><span color='red'>&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;;
     23 	2) setsid -f "$TERMINAL" -e calcurse ;;
     24 	3) notify-send "Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\`
     25 - Middle click opens calcurse if installed" ;;
     26 	6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
     27 esac
     28 
     29 date "+%Y %b %d (%a) $icon%I:%M%p"