aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-04-06 21:44:47 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-04-06 21:44:47 +0800
commit71dce3a13572fdae0ce5f7b1169c69ea9610d800 (patch)
tree5f04b413f10407b8ea6a834b237f6775d19a77f0 /X11
parentff3dfc91aebd454323a25baf6ffd8c9145747564 (diff)
Add feature for time of current context
Diffstat (limited to 'X11')
-rwxr-xr-xX11/show_timer.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/X11/show_timer.sh b/X11/show_timer.sh
index 6ff405a..4fbb5e5 100755
--- a/X11/show_timer.sh
+++ b/X11/show_timer.sh
@@ -1,6 +1,7 @@
1#! /bin/sh 1#! /bin/sh
2 2
3export origin=`xdotool getactivewindow`; \ 3origin="$(xdotool getactivewindow)"
4export origin
4 5
5# If timer is set, focus to it 6# If timer is set, focus to it
6xdotool search --name "TIMER" windowactivate && exit 0 7xdotool search --name "TIMER" windowactivate && exit 0
@@ -14,4 +15,7 @@ alacritty --title TIMER --hold \
14 -o "window.position.y=0" \ 15 -o "window.position.y=0" \
15 -o "window.opacity=0.6" \ 16 -o "window.opacity=0.6" \
16 -o "font.size=40" \ 17 -o "font.size=40" \
17 -e sh -c '~/helper/bin/unix/timer.sh SIGINT "xdotool windowactivate $origin"' 18 -e "$HOME"/helper/bin/unix/timer.sh \
19 SIGINT \
20 "xdotool windowactivate $origin" \
21 'echo $count | ~/helper/bin/task/context_spend_time.sh'