rename conf theme envvars to @fingers-whatever-compact

This commit is contained in:
Jorge Morante 2017-05-02 15:34:08 +02:00
parent 975247c0eb
commit 58266b5ff8
2 changed files with 22 additions and 14 deletions

View File

@ -82,23 +82,27 @@ fingers_defaults=( \
[fingers-patterns]="$PATTERNS" \
[fingers-compact-hints]=1 \
[fingers-copy-command]="" \
[fingers-hint-position]="left" \
[fingers-hint-format]="#[fg=yellow,bold,reverse]%s" \
[fingers-highlight-format]="#[fg=yellow,bold]%s" \
[fingers-hint-format-secondary]="#[fg=yellow,bold] [%s]" \
[fingers-highlight-format-secondary]="#[fg=yellow,bold]%s" \
[fingers-hint-position]="right" \
[fingers-hint-format]="#[fg=yellow,bold][%s]" \
[fingers-highlight-format]="#[fg=yellow,bold,dim]%s" \
[fingers-hint-position-compact]="left" \
[fingers-hint-format-compact]="#[fg=yellow,bold,reverse]%s" \
[fingers-highlight-format-compact]="#[fg=yellow,bold]%s" \
)
set_tmux_env 'fingers-patterns'
set_tmux_env 'fingers-compact-hints'
set_tmux_env 'fingers-copy-command'
set_tmux_env 'fingers-hint-position'
set_tmux_env 'fingers-hint-format' process_format
set_tmux_env 'fingers-highlight-format' process_format
set_tmux_env 'fingers-hint-format-secondary' process_format
set_tmux_env 'fingers-highlight-format-secondary' process_format
for option in fingers-{hint,highlight}-format{,-secondary}; do
set_tmux_env 'fingers-hint-position-compact'
set_tmux_env 'fingers-hint-format-compact' process_format
set_tmux_env 'fingers-highlight-format-compact' process_format
for option in fingers-{hint,highlight}-format{,-compact}; do
env_name="$(envify "$option")_NOCOLOR"
option_value="$(read_from_config "$option")"
default_value="${fingers_defaults[$option]}"

View File

@ -103,19 +103,23 @@ BEGIN {
HINTS[99] = "aa"
finger_patterns = ENVIRON["FINGERS_PATTERNS"];
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION"];
fingers_compact_hints = ENVIRON["FINGERS_COMPACT_HINTS"];
if (fingers_compact_hints)
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION_COMPACT"];
else
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION"];
if (fingers_compact_hints) {
hint_format = ENVIRON["FINGERS_HINT_FORMAT_COMPACT"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_COMPACT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_COMPACT_NOCOLOR"]
highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_COMPACT_NOCOLOR"]
} else {
hint_format = ENVIRON["FINGERS_HINT_FORMAT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOLOR"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT"]
highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOLOR"]
} else {
hint_format = ENVIRON["FINGERS_HINT_FORMAT_SECONDARY"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_SECONDARY"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_SECONDARY_NOCOLOR"]
highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_SECONDARY_NOCOLOR"]
}
if (fingers_hint_position == "left")