diff options
| author | Don Williams <don.e.williams@gmail.com> | 2025-11-26 09:45:44 -0500 |
|---|---|---|
| committer | Don Williams <don.e.williams@gmail.com> | 2025-11-26 09:45:44 -0500 |
| commit | d0a64c6fda3fb62331ae6bb0c696358efed98ecd (patch) | |
| tree | d6a34679e9e272d0a4eeb30d9d4875419617eff3 | |
| parent | d13effd33c992b594ab4967e83fe4355732f49cb (diff) | |
Fixed AWK to pull keybind description not dispatcher
| -rwxr-xr-x | config/hypr/scripts/KeyBinds.sh | 11 |
1 files changed, 3 insertions, 8 deletions
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; |
