diff options
Diffstat (limited to 'hm/soispha/pkgs/scripts')
-rwxr-xr-x | hm/soispha/pkgs/scripts/wrappers/neorg | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts/wrappers/neorg b/hm/soispha/pkgs/scripts/wrappers/neorg index f11772ae..dda81308 100755 --- a/hm/soispha/pkgs/scripts/wrappers/neorg +++ b/hm/soispha/pkgs/scripts/wrappers/neorg @@ -46,6 +46,10 @@ COMMANDS: add Allows you to quickly add projects + + fstart [ID] + Starts the task (ID) but only after it stooped + the previous active task, if it existed. ARGUMENTS: ID | *([0-9]) := [[$(cat %ID_GENERATION_FUNCTION)]] The function displays all possible IDs of the eligable tasks. @@ -208,6 +212,15 @@ ADD_open_taskwarrior_project_file() { fi } # }}} +# {{{ +FSTART_start_new_task() { + task_id="$1"; + # we provided that only one task may be active + active="$(task +ACITVE _ids)"; + [ "$active" ] && task stop "$active"; + task start "$task_id" +} +# }}} for arg in "$@"; do case "$arg" in @@ -263,6 +276,13 @@ while [ "$#" -ne 0 ]; do DMENU_open_context_in_browser; exit 0 ;; + "f"*) # fstart + shift 1; + task_id="$1"; + [ "$task_id" ] || die "No task id provided to fstart"; + FSTART_start_new_task "$task_id"; + exit 0 + ;; *) die "Command '$1' does not exist! Please look at:\n $NAME --help"; exit 0; |