From a0c63f00f9dc7d7d2107195394e972865bfc256d Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 7 May 2021 18:01:46 +0200 Subject: [PATCH] home: pager: add colored man page support --- home/pager.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/home/pager.nix b/home/pager.nix index 54ea3c4..74a4c3b 100644 --- a/home/pager.nix +++ b/home/pager.nix @@ -14,5 +14,20 @@ in PAGER = "less"; # Clear the screen on start and exit LESS = "-R -+X -c"; + + # Colored man pages + LESS_TERMCAP_mb = "$(tput bold; tput setaf 2)"; + LESS_TERMCAP_md = "$(tput bold; tput setaf 6)"; + LESS_TERMCAP_me = "$(tput sgr0)"; + LESS_TERMCAP_so = "$(tput bold; tput setaf 3; tput setab 4)"; + LESS_TERMCAP_se = "$(tput rmso; tput sgr0)"; + LESS_TERMCAP_us = "$(tput bold; tput setaf 2)"; + LESS_TERMCAP_ue = "$(tput rmul; tput sgr0)"; + LESS_TERMCAP_mr = "$(tput rev)"; + LESS_TERMCAP_mh = "$(tput dim)"; + LESS_TERMCAP_ZN = "$(tput ssubm)"; + LESS_TERMCAP_ZV = "$(tput rsubm)"; + LESS_TERMCAP_ZO = "$(tput ssupm)"; + LESS_TERMCAP_ZW = "$(tput rsupm)"; }; }