Direct naar hoofdinhoud

Taskwarrior

Onofficiรซle Beta-vertaling

Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden โ†’

Watโ€‹

Toon Taskwarrior taakgegevens voor configureerbare commando's. Elk benoemd commando voert task uit met de opgegeven argumenten en maakt de ruwe uitvoer beschikbaar in de template.

Voorbeeldconfiguratieโ€‹

{
"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"
}
}
}

Optiesโ€‹

NameTypeDefaultDescription
commandstringtaskthe Taskwarrior executable to use
commandsmap[string]stringsee belowmap of name to Taskwarrior arguments; the raw output is exposed in .Commands

Standaardwaarde voor commandsโ€‹

{
"due": "+PENDING due.before:tomorrow count",
"scheduled": "+PENDING scheduled.before:tomorrow count",
"waiting": "+WAITING count",
"context": "_get rc.context"
}

Elke invoer voert task <arguments> uit en slaat de opgeschoonde stdout op als een string. Verwijder invoeren die je niet nodig hebt om de prompt snel te houden.

Template (informatie)โ€‹

standaard template
 {{ "\uf4a0" }} {{ range $k, $v := .Commands }}{{ $k }}:{{ $v }} {{ end }}

Eigenschappenโ€‹

NameTypeDescription
.Commandsmap[string]stringraw command output keyed by name with the first letter uppercased (e.g. "Due")

Voorbeeldenโ€‹

Toon het resultaat van een specifiek commando direct:

 {{ "\uf4a0" }} Due: {{ .Commands.Due }}

Toon meerdere resultaten:

 {{ "\uf4a0" }} Due: {{ .Commands.Due }} | Waiting: {{ .Commands.Waiting }}

Neem de actieve context op samen met de taakaantallen:

 {{ "\uf4a0" }} {{ .Commands.Context }} - Due: {{ .Commands.Due }} Scheduled: {{ .Commands.Scheduled }}