diff options
-rwxr-xr-x | X11/show_timer.sh | 2 | ||||
-rwxr-xr-x | bin/task/context | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/X11/show_timer.sh b/X11/show_timer.sh index 149b11a..93481e0 100755 --- a/X11/show_timer.sh +++ b/X11/show_timer.sh | |||
@@ -5,7 +5,7 @@ export origin | |||
5 | 5 | ||
6 | # If --context is set, apply exit command and different color | 6 | # If --context is set, apply exit command and different color |
7 | if echo "$@" | grep -qs '\--context'; then | 7 | if echo "$@" | grep -qs '\--context'; then |
8 | COMMAND_EXIT='~/helper/bin/task/context $count' | 8 | COMMAND_EXIT='~/helper/bin/task/context ${count}s' |
9 | export COLOR=33 | 9 | export COLOR=33 |
10 | fi | 10 | fi |
11 | 11 | ||
diff --git a/bin/task/context b/bin/task/context index 6e48df3..44193d0 100755 --- a/bin/task/context +++ b/bin/task/context | |||
@@ -8,7 +8,7 @@ | |||
8 | LOG_FILE=~/log/.context && touch $LOG_FILE | 8 | LOG_FILE=~/log/.context && touch $LOG_FILE |
9 | PLAN_FILE=~/log/plan.context.md | 9 | PLAN_FILE=~/log/plan.context.md |
10 | context="$(cat ~/.task/context)" | 10 | context="$(cat ~/.task/context)" |
11 | [[ "$@" =~ '-s' ]] && SET=true && shift | 11 | [[ "$*" =~ '-s' ]] && SET=true && shift |
12 | time="$1" | 12 | time="$1" |
13 | 13 | ||
14 | # The unit of time display. For example: | 14 | # The unit of time display. For example: |
@@ -76,6 +76,8 @@ _print_spend_time() { | |||
76 | # Print context and time I spend | 76 | # Print context and time I spend |
77 | echo -ne "$ctx\t\t" | 77 | echo -ne "$ctx\t\t" |
78 | date -u -d @"$sec" +%H:%M | tr -d '\n' | 78 | date -u -d @"$sec" +%H:%M | tr -d '\n' |
79 | echo -n "/" | ||
80 | date -u -d @"$seconds_of_plan" +%H:%M | tr -d '\n' | ||
79 | 81 | ||
80 | number_of_spend=$(( $sec / $UNIT )) | 82 | number_of_spend=$(( $sec / $UNIT )) |
81 | # Print block of time spend (green) | 83 | # Print block of time spend (green) |