some config insanity, get rid of bold highlighting in favour of proper black, also some zshrc tweaks
This commit is contained in:
		
							parent
							
								
									6237ee1294
								
							
						
					
					
						commit
						0eafdc61be
					
				
					 5 changed files with 51 additions and 60 deletions
				
			
		
							
								
								
									
										8
									
								
								bashrc
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								bashrc
									
										
									
									
									
								
							| 
						 | 
					@ -56,11 +56,11 @@ prompt_command()
 | 
				
			||||||
        prompt_user="${pred}\u${preset} "
 | 
					        prompt_user="${pred}\u${preset} "
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    if ((UID)); then
 | 
					    if ((UID)); then
 | 
				
			||||||
        bang="${pbold}>"
 | 
					        bang="${pblack}>"
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
        bang="${pbold}${pred}>"
 | 
					        bang="${pred}>"
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
    ps_line1="[ ${prompt_user}${HOSTNAME}:${pbold}$(pwd)${preset} ]"
 | 
					    ps_line1="[ ${prompt_user}${HOSTNAME}:${pblack}$(pwd)${preset} ]"
 | 
				
			||||||
    ps_line2="${bang}${preset} "
 | 
					    ps_line2="${bang}${preset} "
 | 
				
			||||||
    PS1="${ps_line1}\n${ps_line2}"
 | 
					    PS1="${ps_line1}\n${ps_line2}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -143,5 +143,5 @@ plugins="${HOME}/.bashplugins"
 | 
				
			||||||
[[ -r "${plugins}" && "$BASH_VERSINFO" -ge 4 ]] && . "${plugins}"
 | 
					[[ -r "${plugins}" && "$BASH_VERSINFO" -ge 4 ]] && . "${plugins}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# we want to see exit code on error (it also has to be the last entry here)
 | 
					# we want to see exit code on error (it also has to be the last entry here)
 | 
				
			||||||
trap 'printf "${bold}${red}>>${reset} ${bold}exit${reset} ${bold}${red}%s${reset}\n" "$?" >&2' ERR
 | 
					trap 'printf "${red}>>${reset} ${black}exit${reset} ${red}%s${reset}\n" "$?" >&2' ERR
 | 
				
			||||||
# }}}
 | 
					# }}}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,7 @@ scroll_on_output = false
 | 
				
			||||||
scroll_on_keystroke = true
 | 
					scroll_on_keystroke = true
 | 
				
			||||||
audible_bell = false
 | 
					audible_bell = false
 | 
				
			||||||
mouse_autohide = true
 | 
					mouse_autohide = true
 | 
				
			||||||
allow_bold = false
 | 
					allow_bold = true
 | 
				
			||||||
dynamic_title = true
 | 
					dynamic_title = true
 | 
				
			||||||
urgent_on_bell = true
 | 
					urgent_on_bell = true
 | 
				
			||||||
clickable_url = true
 | 
					clickable_url = true
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,7 @@ Plug 'davidhalter/jedi-vim', { 'for': 'python' }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" colorschemes
 | 
					" colorschemes
 | 
				
			||||||
Plug 'lifepillar/vim-solarized8'
 | 
					Plug 'lifepillar/vim-solarized8'
 | 
				
			||||||
 | 
					Plug 'morhetz/gruvbox'
 | 
				
			||||||
Plug 'NLKNguyen/papercolor-theme'
 | 
					Plug 'NLKNguyen/papercolor-theme'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" syntax highlight plugins
 | 
					" syntax highlight plugins
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								vimrc
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								vimrc
									
										
									
									
									
								
							| 
						 | 
					@ -24,13 +24,16 @@ if v:version >= 703
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
if v:version >= 800
 | 
					if v:version >= 800
 | 
				
			||||||
    set breakindent keymap=russian-jcukenwintype iminsert=0 imsearch=0
 | 
					    set breakindent keymap=russian-jcukenwintype iminsert=0 imsearch=0
 | 
				
			||||||
 | 
					    if &term =~ '^[tmux|st|rxvt|xterm]'
 | 
				
			||||||
 | 
					        set termguicolors
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
 | 
					    if &term =~ '^[tmux|st]'
 | 
				
			||||||
 | 
					        set t_8f=[38;2;%lu;%lu;%lum t_8b=[48;2;%lu;%lu;%lum
 | 
				
			||||||
 | 
					    endif
 | 
				
			||||||
    inoremap <C-@> <C-^>
 | 
					    inoremap <C-@> <C-^>
 | 
				
			||||||
    cnoremap <C-@> <C-^>
 | 
					    cnoremap <C-@> <C-^>
 | 
				
			||||||
    inoremap <C-Space> <C-^>
 | 
					    inoremap <C-Space> <C-^>
 | 
				
			||||||
    cnoremap <C-Space> <C-^>
 | 
					    cnoremap <C-Space> <C-^>
 | 
				
			||||||
    if &term =~ 'xterm'
 | 
					 | 
				
			||||||
        set termguicolors
 | 
					 | 
				
			||||||
    endif
 | 
					 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" maps
 | 
					" maps
 | 
				
			||||||
| 
						 | 
					@ -95,6 +98,7 @@ if filereadable(plugins) && v:version >= 703
 | 
				
			||||||
    execute 'source ' . fnameescape(plugins)
 | 
					    execute 'source ' . fnameescape(plugins)
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
colorscheme solarized8_light
 | 
					set bg=dark
 | 
				
			||||||
 | 
					colorscheme PaperColor
 | 
				
			||||||
syntax on
 | 
					syntax on
 | 
				
			||||||
filetype plugin on
 | 
					filetype plugin on
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										88
									
								
								zshrc
									
										
									
									
									
								
							
							
						
						
									
										88
									
								
								zshrc
									
										
									
									
									
								
							| 
						 | 
					@ -8,44 +8,38 @@ local_bin="${HOME}/.local/bin"
 | 
				
			||||||
setopt APPEND_HISTORY EXTENDED_HISTORY HIST_IGNORE_DUPS EXTENDED_GLOB AUTO_CD
 | 
					setopt APPEND_HISTORY EXTENDED_HISTORY HIST_IGNORE_DUPS EXTENDED_GLOB AUTO_CD
 | 
				
			||||||
setopt AUTO_PUSHD PRINT_EXIT_VALUE
 | 
					setopt AUTO_PUSHD PRINT_EXIT_VALUE
 | 
				
			||||||
unsetopt BEEP NO_MATCH NOTIFY
 | 
					unsetopt BEEP NO_MATCH NOTIFY
 | 
				
			||||||
comp_enabled=1
 | 
					 | 
				
			||||||
vcs_enabled=1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
SAVEHIST=1000
 | 
					SAVEHIST=1000
 | 
				
			||||||
HISTSIZE=1000
 | 
					HISTSIZE=1000
 | 
				
			||||||
HISTFILE="${HOME}/.histfile"
 | 
					HISTFILE="${HOME}/.histfile"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# completion
 | 
					# completion
 | 
				
			||||||
if [[ -n ${comp_enabled} ]]; then
 | 
					autoload -Uz compinit zsh/terminfo
 | 
				
			||||||
    autoload -Uz compinit zsh/terminfo
 | 
					compinit
 | 
				
			||||||
    compinit
 | 
					setopt MENU_COMPLETE
 | 
				
			||||||
    setopt MENU_COMPLETE
 | 
					zstyle ':completion:*' completer _list _complete _ignored
 | 
				
			||||||
    zstyle ':completion:*' completer _list _complete _ignored
 | 
					zstyle ':completion:*' insert-unambiguous true
 | 
				
			||||||
    zstyle ':completion:*' insert-unambiguous true
 | 
					zstyle ':completion:*' file-sort name
 | 
				
			||||||
    zstyle ':completion:*' file-sort name
 | 
					zstyle ':completion:*' format 'Completing %d'
 | 
				
			||||||
    zstyle ':completion:*' format 'Completing %d'
 | 
					zstyle ':completion:*' group-name ''
 | 
				
			||||||
    zstyle ':completion:*' group-name ''
 | 
					zstyle ':completion:*' list-colors ''
 | 
				
			||||||
    zstyle ':completion:*' list-colors ''
 | 
					zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
 | 
				
			||||||
    zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
 | 
					zstyle ':completion:*' list-suffixes true
 | 
				
			||||||
    zstyle ':completion:*' list-suffixes true
 | 
					zstyle ':completion:*' menu select=long-list select=0
 | 
				
			||||||
    zstyle ':completion:*' menu select=long-list select=0
 | 
					zstyle ':completion:*' original true
 | 
				
			||||||
    zstyle ':completion:*' original true
 | 
					zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
 | 
				
			||||||
    zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
 | 
					zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}'
 | 
				
			||||||
    zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}'
 | 
					zstyle ':completion:*' rehash true
 | 
				
			||||||
    zstyle ':completion:*' rehash true
 | 
					zstyle ':completion:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
 | 
				
			||||||
    zstyle ':completion:*:kill:*:processes' command 'ps --forest -A -o pid,user,cmd'
 | 
					zstyle ':completion:*:processes-names' command 'ps axho command'
 | 
				
			||||||
    zstyle ':completion:*:processes-names' command 'ps axho command'
 | 
					zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
 | 
				
			||||||
    zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
# git info
 | 
					# git info
 | 
				
			||||||
if [[ -n ${vcs_enabled} ]]; then
 | 
					autoload -Uz vcs_info
 | 
				
			||||||
    autoload -Uz vcs_info
 | 
					zstyle ':vcs_info:*' enable git
 | 
				
			||||||
    zstyle ':vcs_info:*' enable git
 | 
					zstyle ':vcs_info:*' check-for-changes true
 | 
				
			||||||
    zstyle ':vcs_info:*' check-for-changes true
 | 
					zstyle ':vcs_info:*' stagedstr " %F{2}S%f"
 | 
				
			||||||
    zstyle ':vcs_info:*' stagedstr " %F{green}~%f"
 | 
					zstyle ':vcs_info:*' unstagedstr " %F{1}U%f"
 | 
				
			||||||
    zstyle ':vcs_info:*' unstagedstr " %F{red}-%f"
 | 
					zstyle ':vcs_info:*' formats " { %F{4}%r%f %F{3}%b%f%u%c }"
 | 
				
			||||||
    zstyle ':vcs_info:*' formats " { %F{blue}%r%f %F{yellow}%b%f%u%c }"
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export MYSQL_PS1="mysql [\d]> "
 | 
					export MYSQL_PS1="mysql [\d]> "
 | 
				
			||||||
export SSH_AUTH_SOCK="${HOME}/.ssh/ssh_auth_sock"
 | 
					export SSH_AUTH_SOCK="${HOME}/.ssh/ssh_auth_sock"
 | 
				
			||||||
| 
						 | 
					@ -65,11 +59,11 @@ new_line='
 | 
				
			||||||
lb='[ '
 | 
					lb='[ '
 | 
				
			||||||
rb=' ]'
 | 
					rb=' ]'
 | 
				
			||||||
bb=':'
 | 
					bb=':'
 | 
				
			||||||
prompt_user='%(1000#..%B%F{red}%n%f%b )'
 | 
					prompt_user='%(1000#..%F{1}%n%f )'
 | 
				
			||||||
prompt_host='%m'
 | 
					prompt_host='%m'
 | 
				
			||||||
prompt_cwd='%B%d%b'
 | 
					prompt_cwd='%F{8}%d%f'
 | 
				
			||||||
prompt_bang='%B%(!.%F{red}>%f.>)%b '
 | 
					prompt_bang='%(!.%F{1}>%f.%F{8}>%f) '
 | 
				
			||||||
prompt_jobs='%(1j. jobs:%B%F{red}%j%f%b.)'
 | 
					prompt_jobs='%(1j. jobs:%F{1}%j%f.)'
 | 
				
			||||||
precmd() {
 | 
					precmd() {
 | 
				
			||||||
    case ${TERM} in
 | 
					    case ${TERM} in
 | 
				
			||||||
        xterm*|rxvt*)
 | 
					        xterm*|rxvt*)
 | 
				
			||||||
| 
						 | 
					@ -79,12 +73,12 @@ precmd() {
 | 
				
			||||||
            printf "\033k%s@%s\033\\" "${USER}" "${HOST%%.*}"
 | 
					            printf "\033k%s@%s\033\\" "${USER}" "${HOST%%.*}"
 | 
				
			||||||
            ;;
 | 
					            ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
    [[ -n ${vcs_enabled} ]] && vcs_info
 | 
					    vcs_info
 | 
				
			||||||
    PROMPT="[ ${prompt_user}${prompt_host}${bb}${prompt_cwd}${prompt_jobs} ]${vcs_info_msg_0_}${new_line}${prompt_bang}"
 | 
					    PROMPT="[ ${prompt_user}${prompt_host}${bb}${prompt_cwd}${prompt_jobs} ]${vcs_info_msg_0_}${new_line}${prompt_bang}"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
PROMPT2='%b%f%_%B%F{green}>%f%b '
 | 
					PROMPT2='%b%f%_%F{2}>%f%b '
 | 
				
			||||||
PROMPT3='%b%f?%B%F{green}#%f%b '
 | 
					PROMPT3='%b%f?%F{2}#%f%b '
 | 
				
			||||||
PROMPT4='%b%f+%N:%i%B%F{green}>%f%b '
 | 
					PROMPT4='%b%f+%N:%i%F{2}>%f%b '
 | 
				
			||||||
# }}}
 | 
					# }}}
 | 
				
			||||||
# {{{ key bindings
 | 
					# {{{ key bindings
 | 
				
			||||||
bindkey -e
 | 
					bindkey -e
 | 
				
			||||||
| 
						 | 
					@ -146,18 +140,6 @@ alias iconvuk='command iconv -c -f utf-8 -t koi8-r'
 | 
				
			||||||
alias iconvku='command iconv -c -f koi8-r -t utf-8'
 | 
					alias iconvku='command iconv -c -f koi8-r -t utf-8'
 | 
				
			||||||
alias iconvwu='command iconv -c -f cp1251 -t utf-8'
 | 
					alias iconvwu='command iconv -c -f cp1251 -t utf-8'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# grc
 | 
					 | 
				
			||||||
if is_exec grc; then
 | 
					 | 
				
			||||||
    alias ping='command grc --colour=auto ping'
 | 
					 | 
				
			||||||
    alias ping6='command grc --colour=auto ping'
 | 
					 | 
				
			||||||
    alias traceroute='command grc --colour=auto traceroute'
 | 
					 | 
				
			||||||
    alias traceroute6='command grc --colour=auto traceroute'
 | 
					 | 
				
			||||||
    alias make='command grc --colour=auto make'
 | 
					 | 
				
			||||||
    alias diff='command grc --colour=auto diff'
 | 
					 | 
				
			||||||
    alias cvs='command grc --colour=auto cvs'
 | 
					 | 
				
			||||||
    alias netstat='command grc --colour=auto netstat'
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# ls
 | 
					# ls
 | 
				
			||||||
alias ls='command ls --color=auto --group-directories-first '
 | 
					alias ls='command ls --color=auto --group-directories-first '
 | 
				
			||||||
alias la='ls -FA'
 | 
					alias la='ls -FA'
 | 
				
			||||||
| 
						 | 
					@ -195,6 +177,10 @@ fi
 | 
				
			||||||
# screen
 | 
					# screen
 | 
				
			||||||
alias rscreen='command screen -Dr'
 | 
					alias rscreen='command screen -Dr'
 | 
				
			||||||
alias scr='command screen sudo -Es'
 | 
					alias scr='command screen sudo -Es'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# grc
 | 
				
			||||||
 | 
					grc_rc='/etc/grc.zsh'
 | 
				
			||||||
 | 
					[[ -r ${grc_rc} ]] && . ${grc_rc}
 | 
				
			||||||
# }}}
 | 
					# }}}
 | 
				
			||||||
# {{{ global aliases
 | 
					# {{{ global aliases
 | 
				
			||||||
alias -g L='| less -R'
 | 
					alias -g L='| less -R'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue