banga-powerline init portions

This commit is contained in:
Andrew Holland 2017-04-05 05:44:19 +03:00 committed by Server Truck
parent 9381a0966c
commit afe19f9172
2 changed files with 33 additions and 0 deletions

16
powerline_init Normal file
View file

@ -0,0 +1,16 @@
function powerline_precmd() {
PS1="$(~/sturf/banga-powerline/powerline-shell.py $? --shell zsh 2> /dev/null)"
}
function install_powerline_precmd() {
for s in "${precmd_functions[@]}"; do
if [ "$s" = "powerline_precmd" ]; then
return
fi
done
precmd_functions+=(powerline_precmd)
}
if [ "$TERM" != "linux" ]; then
install_powerline_precmd
fi

17
zshrc
View file

@ -62,6 +62,23 @@ prompt fire 125 234 084 054 020
# powerline
#source ~/.local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh
function powerline_precmd() {
PS1="$(~/sturf/banga-powerline/powerline-shell.py $? --shell zsh 2> /dev/null)"
}
function install_powerline_precmd() {
for s in "${precmd_functions[@]}"; do
if [ "$s" = "powerline_precmd" ]; then
return
fi
done
precmd_functions+=(powerline_precmd)
}
if [ "$TERM" != "linux" ]; then
install_powerline_precmd
fi
alias t=todo.sh