diff options
Diffstat (limited to '')
-rwxr-xr-x | hm/soispha/pkgs/scripts/wrappers/neorg/neorg | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/hm/soispha/pkgs/scripts/wrappers/neorg/neorg b/hm/soispha/pkgs/scripts/wrappers/neorg/neorg index 5d229d51..e1100628 100755 --- a/hm/soispha/pkgs/scripts/wrappers/neorg/neorg +++ b/hm/soispha/pkgs/scripts/wrappers/neorg/neorg @@ -50,6 +50,9 @@ COMMANDS: fstart [ID] Starts the task (ID) but only after it stooped the previous active task, if it existed. + + fstop + Stops the current active task ARGUMENTS: ID | *([0-9]) := [[%ID_GENERATION_FUNCTION]] The function displays all possible IDs of the eligable tasks. @@ -232,10 +235,15 @@ ADD_open_taskwarrior_project_file() { # fStart {{{ FSTART_start_new_task() { task_id="$1"; + FSTOP_stop_current_task; + task start "$task_id" +} +# }}} +# fStop {{{ +FSTOP_stop_current_task() { # we ensured that only one task may be active active="$(task +ACTIVE _ids)"; [ "$active" ] && task stop "$active"; - task start "$task_id" } # }}} @@ -293,13 +301,17 @@ while [ "$#" -ne 0 ]; do DMENU_open_context_in_browser; exit 0 ;; - "f"*) # fstart + "fsta"*) # fstart shift 1; task_id="$1"; [ "$task_id" ] || die "No task id provided to fstart"; FSTART_start_new_task "$task_id"; exit 0 ;; + "fsto"*) # fstop + FSTOP_stop_current_task; + exit 0 + ;; *) die "Command '$1' does not exist! Please look at:\n $NAME --help"; exit 0; |