Taskwarrior
Traduction Bêta Non Officielle
Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →
Description
Affiche les données de tâches Taskwarrior via des commandes configurables. Chaque commande nommée exécute
task avec les arguments spécifiés et expose la sortie brute dans le modèle.
Exemple de 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 |
Valeur par défaut de commands
{
"due": "+PENDING due.before:tomorrow count",
"scheduled": "+PENDING scheduled.before:tomorrow count",
"waiting": "+WAITING count",
"context": "_get rc.context"
}
Chaque entrée exécute task <arguments> et stocke la sortie standard (stdout) tronquée sous forme de chaîne. Supprimez les entrées
inutiles pour maintenir un rendu rapide de l'invite.
Modèle (info)
modèle par défaut
{{ "\uf4a0" }} {{ range $k, $v := .Commands }}{{ $k }}:{{ $v }} {{ end }}
Propriétés
| Name | Type | Description |
|---|---|---|
.Commands | map[string]string | raw command output keyed by name with the first letter uppercased (e.g. "Due") |
Exemples
Accéder directement au résultat d'une commande spécifique :
{{ "\uf4a0" }} Due: {{ .Commands.Due }}
Afficher plusieurs résultats :
{{ "\uf4a0" }} Due: {{ .Commands.Due }} | Waiting: {{ .Commands.Waiting }}
Inclure le contexte actif avec les compteurs de tâches :
{{ "\uf4a0" }} {{ .Commands.Context }} - Due: {{ .Commands.Due }} Scheduled: {{ .Commands.Scheduled }}