From f31430bb4189af8383ddbd4456ee0684c4174d75 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 4 Aug 2014 18:04:41 +0400 Subject: [PATCH] Set LESS_TERMCAP_* for light and dark backgrounds --- .profile | 3 +++ lib/config/less/dark_bg | 14 ++++++++++++++ lib/config/less/light_bg | 14 ++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 lib/config/less/dark_bg create mode 100644 lib/config/less/light_bg diff --git a/.profile b/.profile index e279887..2fd98f0 100644 --- a/.profile +++ b/.profile @@ -65,11 +65,13 @@ if [ -t 0 ] ; then # mutt, python and vim BACKGROUND=DARK export BACKGROUND + . "$HOME"/lib/config/less/dark_bg ;; *rxvt*|screen*|*term*|vt100) BACKGROUND=LIGHT export BACKGROUND + . "$HOME"/lib/config/less/light_bg ;; esac @@ -185,6 +187,7 @@ if [ -n "$DISPLAY" ]; then # mutt, python and vim BACKGROUND=LIGHT export BACKGROUND + . "$HOME"/lib/config/less/light_bg # BROWSERs BROWSER="firefox:seamonkey:chromium:google-chrome:opera:xlinks2:$BROWSER" diff --git a/lib/config/less/dark_bg b/lib/config/less/dark_bg new file mode 100644 index 0000000..a547352 --- /dev/null +++ b/lib/config/less/dark_bg @@ -0,0 +1,14 @@ +# See https://unix.stackexchange.com/q/108699 and man terminfo +export LESS_TERMCAP_ZN="`tput ssubm`" # Enter subscript mode +export LESS_TERMCAP_ZO="`tput ssupm`" # Enter superscript mode +export LESS_TERMCAP_ZV="`tput rsubm`" # End subscript mode +export LESS_TERMCAP_ZW="`tput rsupm`" # End superscript mode +export LESS_TERMCAP_mb="`tput bold; tput setaf 2`" # begin blinking - bold green +export LESS_TERMCAP_md="`tput bold; tput setaf 6`" # begin bold - cyan +export LESS_TERMCAP_me="`tput sgr0`" # end mode +export LESS_TERMCAP_mh="`tput dim`" # half-bright mode +export LESS_TERMCAP_mr="`tput rev`" # reverse video mode +export LESS_TERMCAP_se="`tput rmso; tput sgr0`" # end standout-mode +export LESS_TERMCAP_so="`tput bold; tput setaf 7; tput setab 4`" # begin standout-mode (info box) - white on blue +export LESS_TERMCAP_ue="`tput rmul; tput sgr0`" # end underline +export LESS_TERMCAP_us="`tput smul; tput bold; tput setaf 7`" # # begin underline - white diff --git a/lib/config/less/light_bg b/lib/config/less/light_bg new file mode 100644 index 0000000..03df111 --- /dev/null +++ b/lib/config/less/light_bg @@ -0,0 +1,14 @@ +# See https://unix.stackexchange.com/q/108699 and man terminfo +export LESS_TERMCAP_ZN="`tput ssubm`" # Enter subscript mode +export LESS_TERMCAP_ZO="`tput ssupm`" # Enter superscript mode +export LESS_TERMCAP_ZV="`tput rsubm`" # End subscript mode +export LESS_TERMCAP_ZW="`tput rsupm`" # End superscript mode +export LESS_TERMCAP_mb="`tput bold; tput setaf 5`" # begin blinking - bold magenta +export LESS_TERMCAP_md="`tput bold; tput setaf 4`" # begin bold - blue +export LESS_TERMCAP_me="`tput sgr0`" # end mode +export LESS_TERMCAP_mh="`tput dim`" # half-bright mode +export LESS_TERMCAP_mr="`tput rev`" # reverse video mode +export LESS_TERMCAP_se="`tput rmso; tput sgr0`" # end standout-mode +export LESS_TERMCAP_so="`tput bold; tput setaf 7; tput setab 4`" # begin standout-mode (info box) - white on blue +export LESS_TERMCAP_ue="`tput rmul; tput sgr0`" # end underline +export LESS_TERMCAP_us="`tput smul; tput bold; tput setaf 0`" # # begin underline - white -- 2.39.5