actually, rename conf theme envvars to @fingers-whatever-nocompact

This commit is contained in:
Jorge Morante 2017-05-02 15:46:28 +02:00
parent 02b77b40b4
commit dbfe66fd43
3 changed files with 20 additions and 17 deletions

View File

@ -128,7 +128,7 @@ set -g @fingers-copy-command 'xclip -selection clipboard'
`default: 1` `default: 1`
By default **tmux-fingers** will show hints a compact format. For example: By default **tmux-fingers** will show hints in a compact format. For example:
<pre> <pre>
/path/to/foo/bar/lol /path/to/foo/bar/lol

View File

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

View File

@ -106,20 +106,20 @@ BEGIN {
fingers_compact_hints = ENVIRON["FINGERS_COMPACT_HINTS"]; fingers_compact_hints = ENVIRON["FINGERS_COMPACT_HINTS"];
if (fingers_compact_hints) if (fingers_compact_hints)
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION_COMPACT"];
else
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION"]; fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION"];
else
fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION_NOCOMPACT"];
if (fingers_compact_hints) { 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 = ENVIRON["FINGERS_HINT_FORMAT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOLOR"] hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOLOR"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT"] highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT"]
highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOLOR"] highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOLOR"]
} else {
hint_format = ENVIRON["FINGERS_HINT_FORMAT_NOCOMPACT"]
highlight_format = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOMPACT"]
hint_format_nocolor = ENVIRON["FINGERS_HINT_FORMAT_NOCOMPACT_NOCOLOR"]
highlight_format_nocolor = ENVIRON["FINGERS_HIGHLIGHT_FORMAT_NOCOMPACT_NOCOLOR"]
} }
if (fingers_hint_position == "left") if (fingers_hint_position == "left")