dotfiles

my dotfiles.
Log | Files | Refs | README | LICENSE

clock.sh (1100B)


      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 --color=always | sed "s/..7m/<b><span color="red">/;s/..27m/</span></b>/")" && notify-send "Appointments" "$(calcurse -D ~/.config/calcurse -d3)" ;;
     23 	2) setsid "$TERMINAL" -e calcurse -D ~/.config/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) "$TERMINAL" -e "$EDITOR" "$0" ;;
     27 esac
     28 
     29 #printf '%s %s%sn' "$(date '+%Y %b %d (%a)')" "$icon" "$(date '+%I:%M%p')"
     30 
     31 #for europeans, use this
     32 #printf '%s %s%sn' "$(date '+%a %d/%m')" "$icon" "$(date '+%I:%M%p')"
     33 printf '%s %s%sn' "$(date '+%a %d/%m')" "$(date '+%I:%M%p')"