diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-06-03 19:56:25 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-06-03 19:56:25 +0200 |
commit | f0b527f61e251a879a179ff4fef16baaa486c047 (patch) | |
tree | 643a5717fcf243c5430cf8b0609d23bd2fa41b59 /pw-date | |
parent | 95a142be5215939fc6b5be643e4fa44650415e2c (diff) | |
download | scripts-f0b527f61e251a879a179ff4fef16baaa486c047.tar.gz scripts-f0b527f61e251a879a179ff4fef16baaa486c047.tar.bz2 scripts-f0b527f61e251a879a179ff4fef16baaa486c047.zip |
update
Diffstat (limited to 'pw-date')
-rwxr-xr-x | pw-date | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# X220 screen is 1366x768 +width=300 +height=180 +X=$((1366-width)) +Y=24 # bar height + +case $BLOCK_BUTTON in + 1) + pid=$(wmctrl -lp | awk '/Orage/{print $3}') + if (( pid > 0 )) ; then + kill -9 "$pid" + else + { orage > /dev/null 2>&1; } & + wmctrl -r "orage" -e "0,$X,$Y,$width,$height" + fi + ;; + + 3) + TODAY=$(date '+%-d') + HEAD=$(cal | head -n1) + BODY=$(cal | tail -n7 | sed -z "s|$TODAY|<u><b>$TODAY</b></u>|1") + + dunstify "$HEAD" "$BODY" \ + -i office-calendar-symbolic \ + -h string:x-canonical-private-synchronous:calendar \ + -u normal + ;; + + +esac + +echo "$(date '+%a %d %b %T')" |