diff options
author | Tom Willemsen | 2012-11-10 12:57:14 +0100 |
---|---|---|
committer | Tom Willemsen | 2012-11-10 12:57:14 +0100 |
commit | 432524aa4d63bbccac75e25abfb813be0dd5e5fa (patch) | |
tree | 9de5b7848fb3ea2004cd06e21bf1055e2e604381 /.zsh/functions/prompt | |
parent | e1b5ceb33159205dce41ae835f8b2bb06a8f3c84 (diff) | |
download | dotfiles-432524aa4d63bbccac75e25abfb813be0dd5e5fa.tar.gz dotfiles-432524aa4d63bbccac75e25abfb813be0dd5e5fa.zip |
Undo move
Diffstat (limited to '.zsh/functions/prompt')
-rw-r--r-- | .zsh/functions/prompt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/.zsh/functions/prompt b/.zsh/functions/prompt new file mode 100644 index 0000000..6fe927b --- /dev/null +++ b/.zsh/functions/prompt @@ -0,0 +1,15 @@ +# -*- mode: shell-script; eval: (git-auto-commit-mode 1) -*- + +local pac_cnt=$(get_cnt updates) +local aur_cnt=$(get_cnt aur) +local hostname=$(hostname | cut -d . -f 1) + +if [ $pac_cnt -gt 0 -o $aur_cnt -gt 0 ]; then + printf "%s%d%s/%s%d%s:" \ + "%{${fg[cyan]}%}" $pac_cnt "%{${fg[default]}%}" \ + "%{${fg[cyan]}%}" $aur_cnt "%{${fg[default]}%}" +fi + +printf '%s%s%s:%s%s%s%s ' \ + "%{${fg[magenta]}%}" $hostname "%{${fg[default]}%}" \ + "%(?.%{${fg[green]}%}.%{${fg[red]}%})" "%~" "%{${fg[default]}%}" |