From 4b4afc68f30bb394f835c6c7582dc1d6311c2035 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 8 Dec 2022 12:59:07 +0100 Subject: [PATCH] task: Add taskopen action for links and note ext Custom note extensions can be set and opened through annotating a task with `Note.ext` instead of just the usual `Note` - the extension will automatically be opened. Additionally, tasks annotated with links can now have their links opened through xdg-open with `to`. --- taskwarrior/.config/task/taskopenrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/taskwarrior/.config/task/taskopenrc b/taskwarrior/.config/task/taskopenrc index 04163ee..c1dd7ac 100644 --- a/taskwarrior/.config/task/taskopenrc +++ b/taskwarrior/.config/task/taskopenrc @@ -4,8 +4,14 @@ taskbin = task path_ext = /usr/share/taskopen/scripts [Actions] -notes.regex = "Note" +note_custom_ext.regex = "^Note\\.(.*)" +note_custom_ext.command = "$EDITOR ${XDG_DATA_HOME:-~/.local/share}/task/notes/$UUID.$LAST_MATCH" + +notes.regex = "^Note" notes.command = "$EDITOR ${XDG_DATA_HOME:-~/.local/share}/task/notes/$UUID.md" +links.regex = "^https?://" +links.command = "xdg-open $FILE" + [CLI]