aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xX11/show_timer.sh2
-rwxr-xr-xbin/task/context_spend_time.sh4
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 \
18 -e "$HOME"/helper/bin/unix/timer.sh \ 18 -e "$HOME"/helper/bin/unix/timer.sh \
19 SIGINT \ 19 SIGINT \
20 "xdotool windowactivate $origin" \ 20 "xdotool windowactivate $origin" \
21 'echo $count | ~/helper/bin/task/context_spend_time.sh' 21 '~/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 @@
1#! /bin/bash 1#! /bin/bash
2 2
3LOG_FILE=~/log/context 3LOG_FILE=~/log/context && touch $LOG_FILE
4context="$(cat ~/.task/context)" 4context="$(cat ~/.task/context)"
5count="$1" 5count="$1"
6 6
@@ -20,7 +20,7 @@ if [ -n "$1" ]; then
20 if [ "$update" = true ]; then 20 if [ "$update" = true ]; then
21 sed -i -E "s/^$context.*/$context\t$summary" $LOG_FILE 21 sed -i -E "s/^$context.*/$context\t$summary" $LOG_FILE
22 else 22 else
23 echo -e "$context\t$summary" >>$LOG_FILE 23 echo -e "$context\t$count" >>$LOG_FILE
24 fi 24 fi
25else 25else
26 # Print times for each context 26 # Print times for each context