diff options
Diffstat (limited to '.local/bin/done')
| -rwxr-xr-x | .local/bin/done | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/.local/bin/done b/.local/bin/done index ae76287..950541c 100755 --- a/.local/bin/done +++ b/.local/bin/done | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
| 2 | 2 | ||
| 3 | # we `start` tasks through taskwarrior which uses a hook to start them in | 3 | # we `start` tasks through taskwarrior which uses a hook to start them in |
| 4 | # timewarrior | 4 | # timewarrior |
| @@ -7,11 +7,10 @@ function say_cancel { notify-send "cancelling, no action taken" "" --app-name="d | |||
| 7 | 7 | ||
| 8 | if ACTIVE_TASK=$(task active); then | 8 | if ACTIVE_TASK=$(task active); then |
| 9 | 9 | ||
| 10 | task_id=$(echo "${ACTIVE_TASK}" | head -n4 | tail -n1 | cut -d' ' -f1) | 10 | task_id=$(task active_task_id | xargs | cut -d' ' -f3) |
| 11 | task_description=$(echo "${ACTIVE_TASK}" | head -n4 | tail -n1 | cut -d' ' -f2-) | 11 | task_description=$(echo "${ACTIVE_TASK}" | head -n4 | tail -n1 | cut -d' ' -f2-) |
| 12 | 12 | ||
| 13 | if choice=$(printf "done\npause" | rofi -dmenu -p "${task_description}" -lines 2 -no-custom); then | 13 | if choice=$(printf "done\npause" | rofi -dmenu -p "${task_description}" -lines 2 -no-custom); then |
| 14 | |||
| 15 | if [[ ${choice} == "done" ]]; then | 14 | if [[ ${choice} == "done" ]]; then |
| 16 | task "done" "${task_id}" | 15 | task "done" "${task_id}" |
| 17 | notify-send "👏👏👏 good work there" "task ${task_description} is complete" --app-name="done" --icon="checkmark" | 16 | notify-send "👏👏👏 good work there" "task ${task_description} is complete" --app-name="done" --icon="checkmark" |
