From ff3dfc91aebd454323a25baf6ffd8c9145747564 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 6 Apr 2023 17:25:36 +0800 Subject: WIP --- X11/show_timer.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 X11/show_timer.sh (limited to 'X11/show_timer.sh') diff --git a/X11/show_timer.sh b/X11/show_timer.sh new file mode 100755 index 0000000..6ff405a --- /dev/null +++ b/X11/show_timer.sh @@ -0,0 +1,17 @@ +#! /bin/sh + +export origin=`xdotool getactivewindow`; \ + +# If timer is set, focus to it +xdotool search --name "TIMER" windowactivate && exit 0 + +# Add new window for a timer +# Use SIGINT +alacritty --title TIMER --hold \ + -o "window.dimensions.columns=8" \ + -o "window.dimensions.lines=1" \ + -o "window.position.x=-0" \ + -o "window.position.y=0" \ + -o "window.opacity=0.6" \ + -o "font.size=40" \ + -e sh -c '~/helper/bin/unix/timer.sh SIGINT "xdotool windowactivate $origin"' -- cgit v1.2.3-70-g09d2