From ea458db64cb56dfbad7a0bc7f7ef826e71d79fb1 Mon Sep 17 00:00:00 2001 From: Dheepak Krishnamurthy Date: Wed, 24 Mar 2021 10:11:53 -0600 Subject: [PATCH] Update README.md --- README.md | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index b563431..60859c6 100644 --- a/README.md +++ b/README.md @@ -235,34 +235,40 @@ uda.taskwarrior-tui.keyconfig.previous-tab=[ Click to expand! -You can configure shortcuts to execute custom commands from your `taskwarrior`'s `taskrc` file (default: `~/.taskrc`). You have to map a shortcut to an executable file : +You can configure shortcuts to execute custom commands from your `taskwarrior`'s `taskrc` file (default: `~/.taskrc`). +You can do this by mapping a shortcut to an executable file: ```plaintext -uda.taskwarrior-tui.shortcuts.1=~/.config/taskwarrior-tui/shortcut-scripts/toggle-next-tag.sh +uda.taskwarrior-tui.shortcuts.1=~/.config/taskwarrior-tui/shortcut-scripts/add-personal-tag.sh uda.taskwarrior-tui.shortcuts.2=~/.config/taskwarrior-tui/shortcut-scripts/sync.sh ... ``` -PS1 : file can have any name in any location, but MUST be executable. -PS2 : 0 iz reserved for future use, see -When you hit the shortcut, the script will be executed with the `selected task uuid` as a parameter : +The file can have any name in any location, but must be executable. +By default, keys `1`-`9` are available to run shortcuts. -```plaintext -~/.config/taskwarrior-tui/shortcut-scripts/toggle-next-tag.sh $selected_task_uuid +When you hit the shortcut, the script will be executed with the `selected_task_uuid` as an argument: + +```bash +~/.config/taskwarrior-tui/shortcut-scripts/add-personal-tag.sh $selected_tasks_uuid ``` -For exemple, you can add the `next` tag to the currently selected task with the following script in `~/.config/taskwarrior-tui/shortcut-scripts/toggle-next-tag.sh` : +For example, you can add the `personal` tag to the currently selected task with the following script in `~/.config/taskwarrior-tui/shortcut-scripts/add-personal-tag.sh` : ```plaintext -task $1 mod +next +task rc.bulk=0 rc.confirmation=off rc.dependency.confirmation=off rc.recurrence.confirmation=off "$@" modify +personal ``` -By default, shortcuts are linked to the `1-9` number row keys. They can be customized as any other keys through `uda.taskwarrior-tui.keyconfig.shortcut0=`. For exemple : +By default, shortcuts are linked to the `1-9` number row keys. +They can be customized as any other keys through `uda.taskwarrior-tui.keyconfig.shortcut1=`. +For example: ```plaintext -uda.taskwarrior-tui.keyconfig.shortcut0=n +uda.taskwarrior-tui.keyconfig.shortcut1=n ``` +You can set up shortcuts to run `task sync` or any custom bash script that you'd like. + # Related