Repository navigation
Expand file tree
/
Copy path.taskopenrc
More file actions
112 lines (100 loc) · 4.16 KB
/
Copy path.taskopenrc
File metadata and controls
112 lines (100 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[General]
taskbin=task
taskargs
# no_annotation_hook="addnote $ID"
task_attributes="priority,project,tags,description"
--sort:"urgency-,annot"
--active-tasks:"+PENDING"
EDITOR=nvim
path_ext=/usr/share/taskopen/scripts
[Actions]
nvimline.target=annotations
nvimline.labelregex=".*"
nvimline.regex="^nvimline:(\\d+):(.*)"
nvimline.command="/home/decoder/.config/taskwarrior-tui/shortcut-scripts/taksopen_line.sh $FILE $TASK_DESCRIPTION"
nvimline.modes="batch,any,normal"
files.target=annotations
files.labelregex=".*"
files.regex="^[\\.\\/~]+.*\\.(.*)"
files.command="$EDITOR $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"
# PROJECT: slack-thread-annotations
# See: scripts/__github_issue_sync.sh, scripts/__slack_open.sh
# Slack threads and reference links mirrored from Linear attachments, written as
# "slack: <url>" and "link: <url>". The space after the colon is deliberate: it
# is what makes taskopen parse the word as a LABEL (its annotation grammar is
# `(?:(\S+):\s+)?(.*)`), which is what labelregex below can then select on. The
# older space-less "PR:<url>" form has no label, so it can only be matched as
# raw text.
#
# The catch-all `url` action below matches any annotation containing http, and
# in normal/batch mode taskopen runs only the FIRST matching action. Its
# labelregex therefore excludes these two labels; without that exclusion `url`
# wins and every Slack link opens in a browser. Placement in this file does NOT
# fix it: despite what taskopenrc(5) says about config order setting priority,
# taskopen 2.0.2 was measured resolving `url` first even with these actions
# written above it.
slack.target=annotations
slack.labelregex="^slack$"
slack.regex="(https?://[^\\s]+)"
slack.command="__slack_open.sh $LAST_MATCH"
slack.modes="batch,any,normal"
link.target=annotations
link.labelregex="^link$"
link.regex="(https?://[^\\s]+)"
link.command="__taskopen_url_open.sh $LAST_MATCH 2>/dev/null"
link.modes="batch,any,normal"
# __taskopen_url_open.sh, not a bare `open`: it opens the url AND tiles
# browser + terminal. That tiling used to run unconditionally after every
# taskopen call, so opening a file or a brief rearranged the desktop too.
url.target=annotations
# Everything EXCEPT the two labels that have their own opener above. Other
# labelled annotations ("upstream: https://...") keep falling through to here,
# which is what they did before and still should.
url.labelregex="^(?!slack$|link$).*"
url.regex="((?:www|http).*)"
url.command="__taskopen_url_open.sh $LAST_MATCH 2>/dev/null"
url.modes="batch,any,normal"
email.target=annotations
email.labelregex=".*"
email.regex="^id:([^\\s]+)"
email.command="neomutt -f notmuch://?query=id:$LAST_MATCH"
email.modes="batch,any,normal"
# PROJECT: task-resume-annotations
# See: ~/.claude/commands/ops-annotate-task.md, ~/.claude/scripts/__taskopen_claude_resume.sh
# Issue: https://github.com/Piotr1215/claude/issues/42
claude.target=annotations
claude.labelregex=".*"
claude.regex="^claude://.*"
claude.command="__taskopen_claude_resume.sh $ANNOTATION"
claude.modes="batch,any,normal"
brief.target=annotations
brief.labelregex=".*"
brief.regex="^brief:(.*)"
brief.command="$EDITOR $LAST_MATCH"
brief.modes="batch,any,normal"
summary.target=annotations
summary.labelregex=".*"
summary.regex="^summary://(.*)"
summary.command="$EDITOR $LAST_MATCH"
summary.modes="batch,any,normal"
pr.target=annotations
pr.labelregex=".*"
pr.regex="^PR:(.*)"
pr.command="__taskopen_url_open.sh $LAST_MATCH 2>/dev/null"
pr.modes="batch,any,normal"
[CLI]
# Scoping knobs, so a task carrying a brief, a Linear url, a PR, two Slack
# threads and a Notion page does not force a hunt through a numbered list.
# --include both restricts the actions considered AND sets their priority, so
# these bypass the catch-all `url` action without reordering anything above.
# taskopen slack <filter> jump straight to the Slack threads
# taskopen refs <filter> every external reference, nothing local
alias.slack="normal --include=slack"
alias.refs="any --include=slack,link,pr"
group.refs="slack,link,pr"