]> git.alrj.org Git - zsh.d.git/blobdiff - S90_prompt
Add battery level in right prompt.
[zsh.d.git] / S90_prompt
index 9ca2cd6222d79d8b8eb91b1e1c4ab75d92556ac5..e95bc9ee418ad62e7e7f0d219fe541d13d079b4d 100644 (file)
@@ -1,9 +1,5 @@
 #! /usr/bin/zsh
 
-autoload -U colors
-colors
-setopt prompt_subst
-
 #
 # Prepare colors, ignoring length
 #
@@ -26,9 +22,11 @@ _hour="${C_BCYAN}[%D{%H:%M}]${C_NO}"
 _exitcode="%(?::${C_BRED}[ %1v ]${C_NO}
 )$(true)"
 
-_action="%(3v,%3v%,)"
-_path='${C_GREEN}%(5v,%20<..<%5v%<<${C_NO}${C_MAGENTA}@%4v%3v${C_BYELLOW}%7v${C_NO}${C_GREEN}/%15<..<%6v%<<,%25<..<%~%<<)${C_NO}'
+_action="%(5v,%5v%,)"
+_path='${C_GREEN}%(7v,%20<..<%7v%<<${C_NO}${C_MAGENTA}@%6v%5v${C_BYELLOW}%9v${C_NO}${C_GREEN}/%15<..<%8v%<<,%25<..<%~%<<)${C_NO}'
+
 
+_batt='%{${fg_bold[$psvar[3]]}%}%2v%{$reset_color%} '
 
 #
 # Now, the prompt itself
@@ -36,3 +34,4 @@ _path='${C_GREEN}%(5v,%20<..<%5v%<<${C_NO}${C_MAGENTA}@%4v%3v${C_BYELLOW}%7v${C_
 #PROMPT="${_exitcode}${_hour} ${_username}@${_machine}:${_vcs}${_path}$ "
 PROMPT="${_exitcode}${_username}@${_machine}:${_vcs}${_path}$ "
 
+RPROMPT="${_batt}"
\ No newline at end of file