diff options
-rwxr-xr-x | X11/show_timer.sh | 2 | ||||
-rwxr-xr-x | 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 \ | |||
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 | ||
3 | LOG_FILE=~/log/context | 3 | LOG_FILE=~/log/context && touch $LOG_FILE |
4 | context="$(cat ~/.task/context)" | 4 | context="$(cat ~/.task/context)" |
5 | count="$1" | 5 | count="$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 |
25 | else | 25 | else |
26 | # Print times for each context | 26 | # Print times for each context |