Taskwarrior
Whatโ
Display Taskwarrior task data for configurable commands. Each named command runs
task with the specified arguments and exposes the raw output in the template.
Sample Configurationโ
- json
- yaml
- toml
{
"type": "taskwarrior",
"style": "powerline",
"powerline_symbol": "๎ฐ",
"foreground": "#193549",
"background": "#ffeb3b",
"template": " ๏ {{ range $k, $v := .Commands }}{{ $k }}:{{ $v }} {{ end }}",
"options": {
"commands": {
"due": "+PENDING due.before:tomorrow count",
"scheduled": "+PENDING scheduled.before:tomorrow count",
"waiting": "+WAITING count",
"context": "_get rc.context"
}
}
}
type: taskwarrior
style: powerline
powerline_symbol: ๎ฐ
foreground: "#193549"
background: "#ffeb3b"
template: " ๏ {{ range $k, $v := .Commands }}{{ $k }}:{{ $v }} {{ end }}"
options:
commands:
due: +PENDING due.before:tomorrow count
scheduled: +PENDING scheduled.before:tomorrow count
waiting: +WAITING count
context: _get rc.context
type = "taskwarrior"
style = "powerline"
powerline_symbol = "๎ฐ"
foreground = "#193549"
background = "#ffeb3b"
template = " ๏ {{ range $k, $v := .Commands }}{{ $k }}:{{ $v }} {{ end }}"
[options.commands]
due = "+PENDING due.before:tomorrow count"
scheduled = "+PENDING scheduled.before:tomorrow count"
waiting = "+WAITING count"
context = "_get rc.context"
Optionsโ
| Name | Type | Default | Description |
|---|---|---|---|
command | string | task | the Taskwarrior executable to use |
commands | map[string]string | see below | map of name to Taskwarrior arguments; the raw output is exposed in .Commands |
Default commands valueโ
{
"due": "+PENDING due.before:tomorrow count",
"scheduled": "+PENDING scheduled.before:tomorrow count",
"waiting": "+WAITING count",
"context": "_get rc.context"
}
Each entry runs task <arguments> and stores the trimmed stdout as a string. Remove entries
you do not need to keep prompt rendering fast.
Template (info)โ
default template
{{ "\uf4a0" }} {{ range $k, $v := .Commands }}{{ $k }}:{{ $v }} {{ end }}
Propertiesโ
| Name | Type | Description |
|---|---|---|
.Commands | map[string]string | raw command output keyed by name with the first letter uppercased (e.g. "Due") |
Examplesโ
Access a specific command result directly:
{{ "\uf4a0" }} Due: {{ .Commands.Due }}
Display multiple results:
{{ "\uf4a0" }} Due: {{ .Commands.Due }} | Waiting: {{ .Commands.Waiting }}
Include the active context alongside task counts:
{{ "\uf4a0" }} {{ .Commands.Context }} - Due: {{ .Commands.Due }} Scheduled: {{ .Commands.Scheduled }}