From d0a64c6fda3fb62331ae6bb0c696358efed98ecd Mon Sep 17 00:00:00 2001 From: Don Williams Date: Wed, 26 Nov 2025 09:45:44 -0500 Subject: Fixed AWK to pull keybind description not dispatcher --- config/hypr/scripts/KeyBinds.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'config/hypr/scripts/KeyBinds.sh') diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh index c2aa56b7..4158b762 100755 --- a/config/hypr/scripts/KeyBinds.sh +++ b/config/hypr/scripts/KeyBinds.sh @@ -109,7 +109,7 @@ if [[ -z "$raw_keybinds" ]]; then exit 1 fi -# transform into a readable list: MODS+KEY — DESCRIPTION — DISPATCHER [PARAMS] +# transform into a readable list: MODS+KEY — DESCRIPTION (for bindd) or DISPATCHER [PARAMS] (for bind) display_keybinds=$(echo "$raw_keybinds" | awk -F'=' ' function trim(s){ gsub(/^[ \t]+|[ \t]+$/,"",s); return s } /^[[:space:]]*bind/ { @@ -138,13 +138,8 @@ display_keybinds=$(echo "$raw_keybinds" | awk -F'=' ' combo = (mods && key) ? mods "+" key : (key?key:mods); - if (desc != "") { - if (dispatcher != "" && params != "") - print combo, " — ", desc, " — ", dispatcher, " ", params; - else if (dispatcher != "") - print combo, " — ", desc, " — ", dispatcher; - else - print combo, " — ", desc; + if (hasdesc && desc != "") { + print combo, " — ", desc; } else { if (dispatcher != "" && params != "") print combo, " — ", dispatcher, " ", params; -- cgit v1.2.3