From dbfe66fd431baebb0c8204e4c215d6168ca9d2c2 Mon Sep 17 00:00:00 2001 From: Jorge Morante Date: Tue, 2 May 2017 15:46:28 +0200 Subject: [PATCH] actually, rename conf theme envvars to @fingers-whatever-nocompact --- README.md | 2 +- scripts/config.sh | 21 ++++++++++++--------- scripts/hinter.awk | 14 +++++++------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 18b2e11..2415525 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ set -g @fingers-copy-command 'xclip -selection clipboard' `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:
 /path/to/foo/bar/lol
diff --git a/scripts/config.sh b/scripts/config.sh
index 10600a7..89fb409 100755
--- a/scripts/config.sh
+++ b/scripts/config.sh
@@ -82,12 +82,14 @@ fingers_defaults=( \
   [fingers-patterns]="$PATTERNS" \
   [fingers-compact-hints]=1 \
   [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-hint-position-compact]="left" \
-  [fingers-hint-format-compact]="#[fg=yellow,bold]%s" \
-  [fingers-highlight-format-compact]="#[fg=yellow,bold,dim]%s" \
+
+  [fingers-hint-position-nocompact]="right" \
+  [fingers-hint-format-nocompact]="#[fg=yellow,bold][%s]" \
+  [fingers-highlight-format-nocompact]="#[fg=yellow,bold,dim]%s" \
 )
 
 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-highlight-format' process_format
 
-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
+set_tmux_env 'fingers-hint-position-nocompact'
+set_tmux_env 'fingers-hint-format-nocompact' 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"
   option_value="$(read_from_config "$option")"
   default_value="${fingers_defaults[$option]}"
diff --git a/scripts/hinter.awk b/scripts/hinter.awk
index f6a7bbb..22cf57d 100644
--- a/scripts/hinter.awk
+++ b/scripts/hinter.awk
@@ -106,20 +106,20 @@ BEGIN {
   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"];
+  else
+    fingers_hint_position = ENVIRON["FINGERS_HINT_POSITION_NOCOMPACT"];
 
   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_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")