aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/show_timer.sh
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-04-06 17:25:36 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-04-06 17:25:36 +0800
commitff3dfc91aebd454323a25baf6ffd8c9145747564 (patch)
tree32024bc96f75ca08abbf45eac7f150f5eafb39fa /X11/show_timer.sh
parentf3235977b05980f40dea1d3acc53ed68e0825d70 (diff)
WIP
Diffstat (limited to 'X11/show_timer.sh')
-rwxr-xr-xX11/show_timer.sh17
1 files changed, 17 insertions, 0 deletions
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 @@
1#! /bin/sh
2
3export origin=`xdotool getactivewindow`; \
4
5# If timer is set, focus to it
6xdotool search --name "TIMER" windowactivate && exit 0
7
8# Add new window for a timer
9# Use SIGINT
10alacritty --title TIMER --hold \
11 -o "window.dimensions.columns=8" \
12 -o "window.dimensions.lines=1" \
13 -o "window.position.x=-0" \
14 -o "window.position.y=0" \
15 -o "window.opacity=0.6" \
16 -o "font.size=40" \
17 -e sh -c '~/helper/bin/unix/timer.sh SIGINT "xdotool windowactivate $origin"'