From 7a348dc1fb66b137b27592b983c3fcdd1e7115aa Mon Sep 17 00:00:00 2001 From: Philip Wittamore Date: Mon, 9 Jun 2025 18:27:25 +0200 Subject: update --- pw-date | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'pw-date') diff --git a/pw-date b/pw-date index 05b2998..9cbdbde 100755 --- a/pw-date +++ b/pw-date @@ -7,35 +7,34 @@ # pkill -RTMIN+1 dwmblocks -echo -e "┊ $(date '+%a %d %b %T')" +echo -e " $(date '+%a %d %b %T')" case $BLOCK_BUTTON in - 1) - TODAY=$(date '+%-d') - HEAD=$(cal | head -n1) - BODY=$(cal | tail -n7 | sed -z "s|$TODAY|$TODAY|1") - - dunstify "$HEAD" "$BODY" \ - -i office-calendar-symbolic \ - -h string:x-canonical-private-synchronous:calendar \ - -u normal - ;; + #1) + # TODAY=$(date '+%-d') + # HEAD=$(cal | head -n1) + # BODY=$(cal | tail -n7 | sed -z "s|$TODAY|$TODAY|1") + # + # dunstify "$HEAD" "$BODY" \ + # -i office-calendar-symbolic \ + # -h string:x-canonical-private-synchronous:calendar \ + # -u normal + #;; - 3) + 1) # X220 screen is 1366x768 - width=300 - height=180 - X=$((1366-width)) - Y=24 # bar height # toggle Orage on/off pid=$(wmctrl -lp | awk '/Orage/{print $3}') if (( pid > 0 )) ; then kill -9 "$pid" else + # this works but is slow, sleep + wmctrl is faster + #xdotool search --onlyvisible --sync --name "Orage" windowmove 1064 23 & { orage > /dev/null 2>&1; } & - wmctrl -r "orage" -e "0,$X,$Y,$width,$height" + sleep 0.2 + wmctrl -r "Orage" -e 0,1064,23,300,180 fi ;; -- cgit v1.2.3