aboutsummaryrefslogtreecommitdiff
path: root/sb-date
diff options
context:
space:
mode:
authorPhilip Wittamore <philip@wittamore.com>2025-06-02 20:53:45 +0200
committerPhilip Wittamore <philip@wittamore.com>2025-06-02 20:53:45 +0200
commit95a142be5215939fc6b5be643e4fa44650415e2c (patch)
tree3e8db10f82f20214856cac16f09f3f0b2de0427c /sb-date
parent1b276b9a2600c902aa865c5b52dc1b791437a516 (diff)
downloadscripts-95a142be5215939fc6b5be643e4fa44650415e2c.tar.gz
scripts-95a142be5215939fc6b5be643e4fa44650415e2c.tar.bz2
scripts-95a142be5215939fc6b5be643e4fa44650415e2c.zip
update
Diffstat (limited to 'sb-date')
-rwxr-xr-xsb-date23
1 files changed, 23 insertions, 0 deletions
diff --git a/sb-date b/sb-date
new file mode 100755
index 0000000..db08327
--- /dev/null
+++ b/sb-date
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Display the current time in HH:MM:SS.
+
+notify() {
+ notify-send --icon=office-calendar-symbolic \
+ --hint=string:x-canonical-private-synchronous:"$1" "$@"
+}
+
+case $BLOCK_BUTTON in
+ 3)
+ 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 color7)'>%m</span>\n" \
+ --format-event "• <span foreground='$(xrdb -get color15)'>%m</span>\n")"
+ [ -n "$appointments" ] && notify "Appointments" "$appointments"
+ ;;
+ 2) setsid --fork terminal -e calcurse ;;
+ 1) dunstify "This Month" "$(cal --color=always)";;
+esac
+
+. sb-theme
+display " $(date '+%a %d %b %T')"