From 2be3a3d75c89f4500a3de337b4d41d721a0fc376 Mon Sep 17 00:00:00 2001 From: tilpner Date: Tue, 17 Sep 2019 15:25:43 +0200 Subject: prompt: integrate taskwarrior --- conf.d/60-prompt.zsh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/conf.d/60-prompt.zsh b/conf.d/60-prompt.zsh index 4b091f4..0c19904 100644 --- a/conf.d/60-prompt.zsh +++ b/conf.d/60-prompt.zsh @@ -117,6 +117,21 @@ left_prompt() { echo -n "$last_status " fi + if (($+commands[task])); then + if [ -f "$HOME/.taskrc" ]; then + local task_count="$(task status:pending count | tr -d '\n')" + + if [ "$task_count" -ne "0" ]; then + zcol "$fg[blue]" + echo -n "[" + zcol "$fg[cyan]" + echo -n "$task_count" + zcol "$fg[blue]" + echo -n "] " + fi + fi + fi + zcol "$reset_color" } -- cgit v1.2.3