mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
Merge branch 'master' of https://github.com/netzverweigerer/oh-my-zsh
This commit is contained in:
commit
8f950df22d
2 changed files with 9 additions and 19 deletions
6
lib/powerline/gate
Normal file
6
lib/powerline/gate
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
colours=(252 29 152 32)
|
||||||
|
prompt_context_user_fg="${colours[1]}"
|
||||||
|
prompt_context_user_bg="${colours[2]}"
|
||||||
|
prompt_context_root_fg="${colours[3]}"
|
||||||
|
prompt_context_root_bg="${colours[4]}"
|
||||||
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
# zshrc
|
# vim:ft=zsh ts=2 sw=2 sts=2
|
||||||
# vim: ts=2 sw=2 sts=2 et
|
|
||||||
#
|
#
|
||||||
# powerline theme - based on agnoster's theme - https://gist.github.com/3712874
|
# powerline theme - based on agnoster's theme - https://gist.github.com/3712874
|
||||||
#
|
#
|
||||||
|
|
@ -187,30 +186,15 @@ build_prompt() {
|
||||||
prompt_end
|
prompt_end
|
||||||
}
|
}
|
||||||
|
|
||||||
## right prompt
|
## right prompt (fixed)
|
||||||
build_rprompt() {
|
build_rprompt() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
FOO="$!"
|
|
||||||
local symbols
|
local symbols
|
||||||
symbols=()
|
symbols=()
|
||||||
drawrightprompt=0
|
drawrightprompt=0
|
||||||
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" && drawrightprompt=1
|
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" && drawrightprompt=1
|
||||||
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" && drawrightprompt=1
|
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" && drawrightprompt=1
|
||||||
if [[ $ZLE_LINE_ABORTED ]]; then
|
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘ $RETVAL" && drawrightprompt=1
|
||||||
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%} ✘ " && drawrightprompt=1
|
|
||||||
else
|
|
||||||
lastchars=8
|
|
||||||
last="$(fc -nl -1 | cut -b -${lastchars})..."
|
|
||||||
|
|
||||||
if [[ "${#last}" -gt "$lastchars" ]]; then
|
|
||||||
last="$(fc -nl -1 | cut -b -${lastchars})..."
|
|
||||||
else
|
|
||||||
last="$(fc -nl -1 | cut -b -${lastchars})"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%} ✘ $RETVAL $(fc -nl -1 | cut -b -8)..." && drawrightprompt=1
|
|
||||||
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%} ✘" && drawrightprompt=1
|
|
||||||
fi
|
|
||||||
if [[ "$drawrightprompt" -eq 1 ]]; then
|
if [[ "$drawrightprompt" -eq 1 ]]; then
|
||||||
prompt_rseperator %k 238
|
prompt_rseperator %k 238
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue