diff options
author | Karel Kočí <karel.koci@nic.cz> | 2017-06-05 07:22:17 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2017-06-05 07:22:17 +0200 |
commit | 704dfec4a151169187fb24108413fe7dc43a33eb (patch) | |
tree | ab450a9287f5659648c0cdc6adf88aed79b90ead /zshrc | |
parent | d37ca99f25cc745db3bed37a81952235613fa731 (diff) | |
download | myconfigs-704dfec4a151169187fb24108413fe7dc43a33eb.tar.gz myconfigs-704dfec4a151169187fb24108413fe7dc43a33eb.tar.bz2 myconfigs-704dfec4a151169187fb24108413fe7dc43a33eb.zip |
Conditionally integrate annoyme
Diffstat (limited to 'zshrc')
-rw-r--r-- | zshrc | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -36,9 +36,15 @@ bindkey "^[[3~" delete-char bindkey "^[3;5~" delete-char # PROMPT ####################################################### -if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi +annoyme_check() { + which annoyme >/dev/null 2>&1 && ls ~/.annoyme/*.pid 2>/dev/null >&2 && \ + echo "%{$fg_bold[red]%}!" +} + +[ $UID -eq 0 ] && NCOLOR="red" || NCOLOR="green" PROMPT="%(?..%{$fg_bold[yellow]%}EXIT: %? -)%{$fg_bold[$NCOLOR]%}%n@%m:%{$fg_bold[blue]%}%1~%{$fg_bold[$NCOLOR]%}%(!.#.$)%{$reset_color%} " +)\$(annoyme_check)%{$fg_bold[$NCOLOR]%}%n@%m:%{$fg_bold[blue]%}%1~%{$fg_bold[$NCOLOR]%}%(!.#.$)%{$reset_color%} " +unset NCOLOR if [ -e ~/.local/git-prompt.sh ]; then source ~/.local/git-prompt.sh |