From 71dce3a13572fdae0ce5f7b1169c69ea9610d800 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 6 Apr 2023 21:44:47 +0800 Subject: Add feature for time of current context --- X11/show_timer.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'X11') 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 @@ #! /bin/sh -export origin=`xdotool getactivewindow`; \ +origin="$(xdotool getactivewindow)" +export origin # If timer is set, focus to it xdotool search --name "TIMER" windowactivate && exit 0 @@ -14,4 +15,7 @@ alacritty --title TIMER --hold \ -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"' + -e "$HOME"/helper/bin/unix/timer.sh \ + SIGINT \ + "xdotool windowactivate $origin" \ + 'echo $count | ~/helper/bin/task/context_spend_time.sh' -- cgit v1.2.3-70-g09d2