diff options
Diffstat (limited to 'X11/show_timer.sh')
-rwxr-xr-x | X11/show_timer.sh | 8 |
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 | ||
3 | export origin=`xdotool getactivewindow`; \ | 3 | origin="$(xdotool getactivewindow)" |
4 | export origin | ||
4 | 5 | ||
5 | # If timer is set, focus to it | 6 | # If timer is set, focus to it |
6 | xdotool search --name "TIMER" windowactivate && exit 0 | 7 | xdotool 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' | ||