diff options
author | tilpner | 2019-09-17 15:25:43 +0200 |
---|---|---|
committer | tilpner | 2019-09-17 15:25:43 +0200 |
commit | 2be3a3d75c89f4500a3de337b4d41d721a0fc376 (patch) | |
tree | afa8d4a9d8276713e984c01f8b4a090d1a75389c /conf.d | |
parent | 28bade0617321b79772d7f494616dcf58aabc938 (diff) | |
download | zsh-2be3a3d75c89f4500a3de337b4d41d721a0fc376.tar.gz zsh-2be3a3d75c89f4500a3de337b4d41d721a0fc376.tar.xz zsh-2be3a3d75c89f4500a3de337b4d41d721a0fc376.zip |
prompt: integrate taskwarrior
Diffstat (limited to 'conf.d')
-rw-r--r-- | conf.d/60-prompt.zsh | 15 |
1 files changed, 15 insertions, 0 deletions
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" } |