diff options
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')" |