Taskwarrior
Traducción Beta No Oficial
Esta página fue traducida por PageTurner AI (beta). No está respaldada oficialmente por el proyecto. ¿Encontraste un error? Reportar problema →
Qué hace
Muestra datos de Taskwarrior mediante comandos configurables. Cada comando nombrado ejecuta
task con los argumentos especificados y expone la salida sin procesar en la plantilla.
Configuración de ejemplo
- 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"
Opciones
| 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 |
Valor predeterminado de commands
{
"due": "+PENDING due.before:tomorrow count",
"scheduled": "+PENDING scheduled.before:tomorrow count",
"waiting": "+WAITING count",
"context": "_get rc.context"
}
Cada entrada ejecuta task <arguments> y almacena la salida estándar recortada como cadena. Elimina entradas
que no necesites para mantener la renderización del prompt rápida.
Plantilla (info)
plantilla predeterminada
{{ "\uf4a0" }} {{ range $k, $v := .Commands }}{{ $k }}:{{ $v }} {{ end }}
Propiedades
| Name | Type | Description |
|---|---|---|
.Commands | map[string]string | raw command output keyed by name with the first letter uppercased (e.g. "Due") |
Ejemplos
Accede directamente al resultado de un comando específico:
{{ "\uf4a0" }} Due: {{ .Commands.Due }}
Muestra múltiples resultados:
{{ "\uf4a0" }} Due: {{ .Commands.Due }} | Waiting: {{ .Commands.Waiting }}
Incluye el contexto activo junto con los recuentos de tareas:
{{ "\uf4a0" }} {{ .Commands.Context }} - Due: {{ .Commands.Due }} Scheduled: {{ .Commands.Scheduled }}