diff options
-rw-r--r-- | zshrc.local | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/zshrc.local b/zshrc.local index d2a26fb..f1de0ca 100644 --- a/zshrc.local +++ b/zshrc.local @@ -4,6 +4,7 @@ bindkey -v export BROWSER=firefox export EDITOR=vim export XKB_DEFAULT_VARIANT=dvorak +export GTK_THEME=Arc-Dark export GPG_TTY=$(tty) gpg-connect-agent updatestartuptty /bye >/dev/null @@ -43,3 +44,43 @@ compinit bashcompinit # Argcomplete explicit registration for pubs eval "$(register-python-argcomplete pubs)" + +# Colors +alias ip='ip -color=auto' +alias diff='diff --color=auto' + +zmodload zsh/zpty + +pty() { + zpty pty-${UID} ${1+$@} + if [[ ! -t 1 ]];then + setopt local_traps + trap '' INT + fi + zpty -r pty-${UID} + zpty -d pty-${UID} +} + +ptyless() { + pty $@ | less +} + +man() { + LESS_TERMCAP_md=$'\e[01;31m' \ + LESS_TERMCAP_me=$'\e[0m' \ + LESS_TERMCAP_se=$'\e[0m' \ + LESS_TERMCAP_so=$'\e[01;44;33m' \ + LESS_TERMCAP_ue=$'\e[0m' \ + LESS_TERMCAP_us=$'\e[01;32m' \ + command man "$@" +} + +export LESS=-R +export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink +export LESS_TERMCAP_md=$'\E[1;36m' # begin bold +export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink +export LESS_TERMCAP_so=$'\E[01;44;33m' # begin reverse video +export LESS_TERMCAP_se=$'\E[0m' # reset reverse video +export LESS_TERMCAP_us=$'\E[1;32m' # begin underline +export LESS_TERMCAP_ue=$'\E[0m' # reset underline +# and so on |