1
0
Fork 0

experimenting with my prompt, yay

This commit is contained in:
Von Random 2014-11-14 19:23:20 +03:00
parent a6956c498b
commit 08613b53cd

26
shellrc
View file

@ -4,6 +4,8 @@
# {{{ common # {{{ common
# {{{ environment # {{{ environment
newline="
"
local_bin="${HOME}/.local/bin" local_bin="${HOME}/.local/bin"
dotfiles="${HOME}/vdotfiles" dotfiles="${HOME}/vdotfiles"
comp_enabled=true comp_enabled=true
@ -137,17 +139,35 @@ if is_zsh; then
fi fi
# }}} # }}}
# {{{ prompt # {{{ prompt
PROMPT="%B%(!..%(1000#..%F{red}%n%f@))%F{blue}%m%f %F{white}%~%f %(1j.+%F{red}%j%f.)%(!.%F{red}.%F{green})%#%f%b " prompt() {
case ${KEYMAP} in
'main')
mode='>'
;;
'vicmd')
mode='|'
;;
*)
mode=''
;;
esac
PROMPT="%(?.%F{green}✓%f.%F{red}✗%f) %(!.%F{red}.%F{blue})%n%f@%B%F{green}%m%f%b %B%d%b:${newline}%(!.%F{red}.)%#%f${mode} "
zle reset-prompt
}
zle-line-init() { prompt; }
zle-keymap-select() { prompt; }
zle -N zle-line-init
zle -N zle-keymap-select
# }}} # }}}
# {{{ key bindings # {{{ key bindings
bindkey -e bindkey -v
# urxvt # urxvt
bindkey '^[[7~' beginning-of-line # home bindkey '^[[7~' beginning-of-line # home
bindkey '^[[8~' end-of-line # end bindkey '^[[8~' end-of-line # end
bindkey '^[Oc' forward-word # ctrl + right bindkey '^[Oc' forward-word # ctrl + right
bindkey '^[Od' backward-word # ctrl + left bindkey '^[Od' backward-word # ctrl + left
bindkey '^[[3^' delete-word # ctrl + del bindkey '^[[3^' delete-word # ctrl + del
bindkey '^H' backward-delete-word # ctrl + backspace #bindkey '^H' backward-delete-word # ctrl + backspace
# screen # screen
bindkey '^[[1~' beginning-of-line # home bindkey '^[[1~' beginning-of-line # home
bindkey '^[[4~' end-of-line # end bindkey '^[[4~' end-of-line # end