From 8adb72ab1e699a863fe3e97840b69955fb28a156 Mon Sep 17 00:00:00 2001 From: Alex Kelly Date: Fri, 27 Jan 2023 21:38:35 -0500 Subject: [PATCH] convert to 2.x config, add joplin handler --- dot_taskopenrc | 102 ++++++++++++++----------------------------------- 1 file changed, 29 insertions(+), 73 deletions(-) diff --git a/dot_taskopenrc b/dot_taskopenrc index 1d2b8d5..437765e 100644 --- a/dot_taskopenrc +++ b/dot_taskopenrc @@ -1,73 +1,29 @@ - -#BROWSER='xdg-open $FILE &>/dev/null' -#EDITOR='vim' -#FILE_CMD='xdg-open' -TASKBIN='task' - -# If you sync tasks NOTES_FOLDER should be a location that syncs and is available to -# other computers, i.e. /users/dropbox/tasknotes -# NOTES_FOLDER to store notes in, must already exist! -NOTES_FOLDER="$HOME/tasknotes/" - -# Preferred extension for tasknotes -NOTES_EXT=".txt" - -# Path to notes file. UUID will be replaced with the actual uuid of -# the task. If NOTES_CMD -# Default is: ${NOTES_FOLDER}UUID${NOTES_EXT} -#NOTES_FILE="$HOME/tasknotes/UUID.txt" - -# Command that opens notes. UUID will be replaced with the actual uuid of -# the task. -# Default is: $EDITOR $NOTES_FILE -#NOTES_CMD="vim "$HOME/tasknotes/$UUID.txt"" - -# Specify the default sorting. -# Default is taskwarrior's default sorting, i.e. sorting by task IDs. -#DEFAULT_SORT="urgency-,label,annot" - -# Apply a default taskwarrior filter in order to exclude certain tasks. -# Default is: status.is:pending -#DEFAULT_FILTER= - -# Default command for '-i' -# Default is: ls -la -#DEFAULT-i="ls -la" - -# Add some paths to the taskopen's PATH variable -#PATH_EXT=/path/to/taskopen/scripts -PATH_EXT=/usr/share/taskopen/scripts - -# Regular expression that referes to the NOTES_FILE. -# Default is: Notes -#NOTES_REGEX="Notes" - -# Regular expression that identifies annotations openable by BROWSER. -# Default is: www|http -#BROWSER_REGEX="www|http" - -# Regular expression that identifies file paths in annotations. Will be opened by xdg-open. -# Default is: \.|\/|~ -#FILE_REGEX="\.|\/|~" - -# Regular expression that identifies a text annotation. Automatically triggers raw edit mode like '-r'. -#TEXT_REGEX=".*" - -# Custom regular expression that specifies annotations passed to CUSTOM1_CMD, e.g: -#CUSTOM1_REGEX="Message-[Ii][Dd]:|message:" -#CUSTOM1_CMD="muttjumpwrapper" - -# Custom regular expression that specifies annotations passed to CUSTOM2_CMD. -#CUSTOM2_REGEX="" -#CUSTOM2_CMD="" - -# Execute an arbitrary command if there is no annotation available. The corresponding taskwarrior IDs will -# be passed as arguments, e.g. "addnote 21 42" -#NO_ANNOTATION_HOOK=addnote - -# Make additional taskwarrior attributes available as sort keys and environment variables. -# E.g. TASK_ATTRIBUTES="project,tags" allows to sort by "task_project" or "task_tags" and to use -# "$TASK_PROJECT" or "$TASK_TAGS" within your (custom) commands. -#TASK_ATTRIBUTES="" -CUSTOM1_REGEX="^cbthunderlink:.*" -CUSTOM1_CMD="/usr/bin/xdg-open" +[General] +taskbin=task +taskargs +no_annotation_hook="addnote $ID" +task_attributes="priority,project,tags,description,joplin" +--sort:"urgency-,annot" +--active-tasks:"+PENDING" +--debug +EDITOR=nvim +path_ext=/usr/local/share/taskopen/scripts +[Actions] +files.target=annotations +files.labelregex=".*" +files.regex="^[\\.\\/~]+.*\\.(.*)" +files.command="xdg-open $FILE" +files.modes="batch,any,normal" +notes.target=annotations +notes.labelregex=".*" +notes.regex="^Notes(\\..*)?" +notes.command="""editnote ~/Notes/tasknotes/$UUID$LAST_MATCH "$TASK_DESCRIPTION" $UUID""" +notes.modes="batch,any,normal" +url.target=annotations +url.labelregex=".*" +url.regex="((?:www|http).*)" +url.command="xdg-open $LAST_MATCH" +url.modes="batch,any,normal" +joplin.target=joplin +joplin.regex=".*" +joplin.command="/home/kellya/.joplin/Joplin.AppImage $TASK_JOPLIN"