summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.zshrc9
1 files changed, 6 insertions, 3 deletions
diff --git a/.zshrc b/.zshrc
index 59855107..af981a90 100644
--- a/.zshrc
+++ b/.zshrc
@@ -142,11 +142,14 @@ alias killlall='killall'
 alias irb='ripl'
 alias l='ls'
 
-function prompt_char {
-	echo '%(!.#.$)'
+setopt PROMPT_SUBST
+
+function prompt_task {
+  COUNT=$(task count -longterm)
+  [ "$COUNT" -gt 0 ] && echo "[%{$fg[red]%}$COUNT%{$fg[green]%}]"
 }
 
-PROMPT="%{$terminfo[bold]$fg[green]%}[%{$fg[blue]%}%30<..<%~%{$fg[green]%}]%(!.#.$)%{$terminfo[sgr0]$reset_color%} "
+PROMPT="%{$terminfo[bold]$fg[green]%}[%{$fg[blue]%}%30<..<%~%{$fg[green]%}]\$(prompt_task)%(!.#.$)%{$terminfo[sgr0]$reset_color%} "
 RPROMPT="%(?..%{$terminfo[bold]$fg[green]%}[%{$fg[red]%}%?%{$fg[green]%}]%{$terminfo[sgr0]%})"
 
 source ~/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
1f66e902dc186de15e49d0dba7830&follow=1'>Bind up and down arrows to scrollJune McEnroe 2019-02-22Remove topic TODOJune McEnroe 2019-02-22Add /znc commandJune McEnroe 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe 2019-02-21Replace "view" with "window"June McEnroe 2019-02-21Remove ROT13June McEnroe 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe