24 lines
787 B
Bash
Executable file
24 lines
787 B
Bash
Executable file
#!/bin/sh
|
|
# Displays the current time in HH:MM:SS (AM|PM)
|
|
|
|
notify() {
|
|
notify-send -i office-calendar-symbolic \
|
|
-h string:x-canonical-private-synchronous:"$1" "$@"
|
|
}
|
|
|
|
case $BLOCK_BUTTON in
|
|
1)
|
|
notify "This Month" "$(cal --color=always |
|
|
sed "s|..7m|<span color='$(xrdb -get color1)'>|;s|..0m|</span>|")"
|
|
appointments="$(calcurse -d1 \
|
|
--format-apt "• <i>%S - %E</i>\n <span foreground='$(xrdb -get color6)'>%m</span>\n" \
|
|
--format-event "• <span foreground='$(xrdb -get color6)'>%m</span>\n")"
|
|
[ -n "$appointments" ] && notify "Appointments" "$appointments"
|
|
;;
|
|
2) setsid -f "$TERMINAL" -e calcurse ;;
|
|
6) "$TERMINAL" -e "$EDITOR" "$0" ;;
|
|
esac
|
|
|
|
. sb-theme
|
|
display " $(date '+%I:%M:%S %p')"
|