adding color configuration env variables

This commit is contained in:
Jorge Morante 2017-02-14 08:41:27 +01:00
parent ba6db34ea5
commit 8ce451da4e
2 changed files with 9 additions and 4 deletions

View File

@ -65,3 +65,8 @@ DEFAULT_FINGER_COMPACT_HINTS=1
FINGERS_COMPACT_HINTS=$(tmux show-option -gqv @fingers-compact-hints)
FINGERS_COMPACT_HINTS=${FINGERS_COMPACT_HINTS:-$DEFAULT_FINGER_COMPACT_HINTS}
export FINGERS_COMPACT_HINTS
export FINGERS_HINT_FORMAT=$(echo -e "\033[30;1;43m%s\033[0m")
export FINGERS_HIGHLIGHT_FORMAT=$(echo -e "\033[1;33m%s\033[0m")
export FINGERS_HINT_FORMAT_SECONDARY=$(echo -e "\033[1;33m[%s]\033[0m")
export FINGERS_HIGHLIGHT_FORMAT_SECONDARY=$(echo -e "\033[1;33m%s\033[0m ")

View File

@ -106,12 +106,12 @@ BEGIN {
finger_patterns = ENVIRON["FINGER_PATTERNS"];
if (COMPACT_HINTS) {
hint_format = "\033[30;1;43m%s\033[0m"
highlight_format = "\033[1;33m%s\033[0m"
hint_format = ENVIRON["FINGERS_HINT_FORMAT"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT"]
compound_format = hint_format highlight_format
} else {
hint_format = "\033[1;33m[%s]\033[0m"
highlight_format = "\033[1;33m%s\033[0m "
hint_format = ENVIRON["FINGERS_HINT_FORMAT_SECONDARY"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_SECONDARY"]
compound_format = highlight_format hint_format
}