diff --git a/lib/powerline/blade b/lib/powerline/blade index 880d90fdc..b7c7d6299 100644 --- a/lib/powerline/blade +++ b/lib/powerline/blade @@ -1,4 +1,4 @@ -colours=(252 160 152 32) +colours=(250 236 152 32) prompt_context_user_fg="${colours[1]}" prompt_context_user_bg="${colours[2]}" prompt_context_root_fg="${colours[3]}" diff --git a/lib/powerline/box b/lib/powerline/box new file mode 100644 index 000000000..341e0dffd --- /dev/null +++ b/lib/powerline/box @@ -0,0 +1,12 @@ +# use $HOME/.zsh/256-color-test.py to test colors. + +# user colors +prompt_context_user_fg="252" +prompt_context_user_bg="240" + +# root colors +prompt_context_root_fg="172" +prompt_context_root_bg="52" + + + diff --git a/lib/powerline/gate b/lib/powerline/gate new file mode 100644 index 000000000..ee6ff7bb8 --- /dev/null +++ b/lib/powerline/gate @@ -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]}" + diff --git a/lib/powerline/nagios b/lib/powerline/nagios new file mode 100644 index 000000000..ee6ff7bb8 --- /dev/null +++ b/lib/powerline/nagios @@ -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]}" + diff --git a/lib/powerline/pad b/lib/powerline/pad new file mode 100644 index 000000000..30c9b4a20 --- /dev/null +++ b/lib/powerline/pad @@ -0,0 +1,8 @@ +colours=(250 60 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]}" + diff --git a/lib/powerline/reality b/lib/powerline/reality new file mode 100644 index 000000000..a25dbc38f --- /dev/null +++ b/lib/powerline/reality @@ -0,0 +1,6 @@ +colours=(252 126 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]}" + diff --git a/themes/powerline-with-hostname.zsh-theme b/themes/powerline-with-hostname.zsh-theme index 850f0568d..fbcce1c66 100644 --- a/themes/powerline-with-hostname.zsh-theme +++ b/themes/powerline-with-hostname.zsh-theme @@ -83,10 +83,10 @@ prompt_context() { local machine="$(hostname -s)" if [[ "$user" == "root" ]]; then # prompt for root - prompt_segment "$prompt_context_root_bg" "$prompt_context_root_fg" "%(!.%{%F{red}%}.)$user@$machine" + prompt_segment "$prompt_context_root_bg" "$prompt_context_root_fg" "%(!.%{%F{${prompt_context_root_fg}}%}.)$user@$machine" else # prompt for normal user - prompt_segment "$prompt_context_user_bg" "$prompt_context_user_fg" "%(!.%{%F{yellow}%}.)$user@$machine" + prompt_segment "$prompt_context_user_bg" "$prompt_context_user_fg" "%(!.%{%F{${prompt_context_user_fg}}%}.)$user@$machine" fi } @@ -186,7 +186,7 @@ build_prompt() { prompt_end } -## right prompt +## right prompt (fixed) build_rprompt() { RETVAL=$? local symbols diff --git a/zshrc b/zshrc index cfe75e017..40a383d7d 100644 --- a/zshrc +++ b/zshrc @@ -8,6 +8,10 @@ ZSH="$HOME/.zsh" # export ZSH_THEME="powerline" # name of zsh theme export ZSH_THEME="powerline-with-hostname" # name of zsh theme +if [[ "$TERM" == "linux" ]]; then + export ZSH_THEME=ezzsh +fi + # Set this to true to use case-sensitive completion CASE_SENSITIVE="false" # bool @@ -21,7 +25,7 @@ DISABLE_LS_COLORS="false" # bool DISABLE_AUTO_TITLE="false" # bool # Uncomment following line if you want disable red dots displayed while waiting for completion -DISABLE_COMPLETION_WAITING_DOTS="true" # bool +DISABLE_COMPLETION_WAITING_DOTS="false" # bool # plugins to load (array) # Example format: plugins=(rails git textmate ruby lighthouse) @@ -52,14 +56,21 @@ export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/sbin:$PATH # set $EDITOR export EDITOR='vim' -# man pages: color -export LESS_TERMCAP_mb=$'\E[01;31m' -export LESS_TERMCAP_md=$'\E[01;33m' +### colors in man pages :) +### ::: man pages: basic coloring ::: +# export LESS_TERMCAP_mb=$'\E[01;31m' +# export LESS_TERMCAP_md=$'\E[01;33m' export LESS_TERMCAP_me=$'\E[0m' export LESS_TERMCAP_se=$'\E[0m' -export LESS_TERMCAP_so=$'\E[01;44;33m' +# export LESS_TERMCAP_so=$'\E[01;44;33m' export LESS_TERMCAP_ue=$'\E[0m' -export LESS_TERMCAP_us=$'\E[01;32m' +# export LESS_TERMCAP_us=$'\E[01;32m' +### ::: man pages (more beautiful 256 coloring) ::: +export LESS_TERMCAP_mb=$'' +export LESS_TERMCAP_md=$'' +export LESS_TERMCAP_so=$'' +export LESS_TERMCAP_us=$'' + # zsh fix for ssh host completion from ~/.ssh/config [ -f ~/.ssh/config ] && : ${(A)ssh_config_hosts:=${${${${(@M)${(f)"$(<~/.ssh/config)"}:#Host *}#Host }:#*\**}:#*\?*}} @@ -144,6 +155,11 @@ if [[ "$OS_TYPE" == "FreeBSD" ]]; then fi fi +if [[ "$OS_TYPE" == "Linux" ]]; then + LS_COMMAND=ls + dircolors_enable=1 +fi + # enable ls colorization: if [ "$TERM" != "dumb" ]; then if [[ "$dircolors_enable" == 1 ]]; then @@ -178,10 +194,16 @@ alias grep='grep --color=auto' # enable ls colorization: if [ "$TERM" != "dumb" ]; then - if [[ "$dircolors_enable" == 1 ]]; then - eval "$(dircolors "$ZSH"/dircolors)" - alias ls="$LS_COMMAND $LS_OPTIONS" - fi + #if [[ "$dircolors_enable" == 1 ]]; then + # eval "$(dircolors "$ZSH"/dircolors)" + # alias ls="$LS_COMMAND $LS_OPTIONS" + #fi + alias ls="$LS_COMMAND $LS_OPTIONS" +fi + +# Fix for KDEs stupid Konsole program +if [[ $KONSOLE_PROFILE_NAME ]]; then + export TERM=xterm-256color fi # do not autocorrect sudo commands (fixes "zsh: correct 'vim' to '.vim' [nyae]?") @@ -195,5 +217,9 @@ alias grep="grep --color='always'" alias less='less -R' alias diff='colordiff' +# sudo shell with "s" +alias s="sudo -s -E" +# don't require "rehash" after installing a package +setopt nohashdirs