diff options
| author | 2014-07-01 22:53:27 +0200 | |
|---|---|---|
| committer | 2014-07-01 22:53:27 +0200 | |
| commit | 0d70f1dc57a7aeaba7a4977ccaccfd44a3722517 (patch) | |
| tree | ec1a851de90f2f97be87fee1943bdd2d0e26be58 /zsh/functions/prompt | |
| parent | d494d318ceedcfc18c81440eb29bd681084ff65c (diff) | |
| download | dotfiles-0d70f1dc57a7aeaba7a4977ccaccfd44a3722517.tar.gz dotfiles-0d70f1dc57a7aeaba7a4977ccaccfd44a3722517.zip | |
Update zsh
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]}%}" |
