From afe19f9172d41a59070057fc89148ceb38f0ebff Mon Sep 17 00:00:00 2001 From: Andrew Holland Date: Wed, 5 Apr 2017 05:44:19 +0300 Subject: [PATCH] banga-powerline init portions --- powerline_init | 16 ++++++++++++++++ zshrc | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 powerline_init diff --git a/powerline_init b/powerline_init new file mode 100644 index 0000000..652b23c --- /dev/null +++ b/powerline_init @@ -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 diff --git a/zshrc b/zshrc index 55585b1..d2fb356 100644 --- a/zshrc +++ b/zshrc @@ -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