From e78991f3d49aa26675d70b6188cd4a23ef231cc9 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Thu, 6 Apr 2023 22:05:02 +0800 Subject: Update --- X11/show_timer.sh | 2 +- bin/task/context_spend_time.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/X11/show_timer.sh b/X11/show_timer.sh index 4fbb5e5..dfe3dd2 100755 --- a/X11/show_timer.sh +++ b/X11/show_timer.sh @@ -18,4 +18,4 @@ alacritty --title TIMER --hold \ -e "$HOME"/helper/bin/unix/timer.sh \ SIGINT \ "xdotool windowactivate $origin" \ - 'echo $count | ~/helper/bin/task/context_spend_time.sh' + '~/helper/bin/task/context_spend_time.sh $count' diff --git a/bin/task/context_spend_time.sh b/bin/task/context_spend_time.sh index cbadc47..8da42c7 100755 --- a/bin/task/context_spend_time.sh +++ b/bin/task/context_spend_time.sh @@ -1,6 +1,6 @@ #! /bin/bash -LOG_FILE=~/log/context +LOG_FILE=~/log/context && touch $LOG_FILE context="$(cat ~/.task/context)" count="$1" @@ -20,7 +20,7 @@ if [ -n "$1" ]; then if [ "$update" = true ]; then sed -i -E "s/^$context.*/$context\t$summary" $LOG_FILE else - echo -e "$context\t$summary" >>$LOG_FILE + echo -e "$context\t$count" >>$LOG_FILE fi else # Print times for each context -- cgit v1.2.3-70-g09d2