diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 73992e9..5bc3292 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -18,6 +18,29 @@ if exists tty && tty -s 1>/dev/null 2>/dev/null; then export GPG_TTY="$(tty)" fi +# Configure less and add colours +export LESS="-RI" +export PAGER="less" +export MANPAGER="less -+N" +# Disable histfile +export LESSHISTFILE=- + +if exists tput; then + export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green + export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan + export LESS_TERMCAP_me=$(tput sgr0) + export LESS_TERMCAP_so=$(tput bold; tput setaf 4) # blue + export LESS_TERMCAP_se=$(tput rmso; tput sgr0) + export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white + export LESS_TERMCAP_ue=$(tput rmul; tput sgr0) + export LESS_TERMCAP_mr=$(tput rev) + export LESS_TERMCAP_mh=$(tput dim) + export LESS_TERMCAP_ZN=$(tput ssubm) + export LESS_TERMCAP_ZV=$(tput rsubm) + export LESS_TERMCAP_ZO=$(tput ssupm) + export LESS_TERMCAP_ZW=$(tput rsupm) +fi + # Set some useful ZSH/Bash options setopt sharehistory histignorealldups histignorespace histreduceblanks setopt pathdirs autocd autopushd extendedglob nullglob alwaystoend interactivecomments dvorak diff --git a/.profile b/.profile index d04ba5b..ae04a10 100644 --- a/.profile +++ b/.profile @@ -43,29 +43,6 @@ export PATH="${PATH}:/sbin:/usr/sbin:$DOTFILES/scripts:$GOPATH/bin" exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; } -# Configure less and add colours -export LESS="-RI" -export PAGER="less" -export MANPAGER="less -+N" -# Disable histfile -export LESSHISTFILE=- - -if exists tput; then - export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green - export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan - export LESS_TERMCAP_me=$(tput sgr0) - export LESS_TERMCAP_so=$(tput bold; tput setaf 4) # blue - export LESS_TERMCAP_se=$(tput rmso; tput sgr0) - export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white - export LESS_TERMCAP_ue=$(tput rmul; tput sgr0) - export LESS_TERMCAP_mr=$(tput rev) - export LESS_TERMCAP_mh=$(tput dim) - export LESS_TERMCAP_ZN=$(tput ssubm) - export LESS_TERMCAP_ZV=$(tput rsubm) - export LESS_TERMCAP_ZO=$(tput ssupm) - export LESS_TERMCAP_ZW=$(tput rsupm) -fi - # Source secret keys and values into environment if [ -f "$XDG_CONFIG_HOME/secrets" ]; then set -o allexport