add keybind to view them all

This commit is contained in:
Frost-Phoenix 2024-01-12 17:36:41 +01:00
parent 0d0afbfd7c
commit d57c8f635f
2 changed files with 9 additions and 0 deletions

View file

@ -132,6 +132,9 @@ in
# ----------------------------------------------------------------
# show keybinds list
bind = $mainMod, F1, exec, ~/.config/hypr/keybind
# keybindings
bind = $mainMod, Return, exec, kitty
bind = ALT, Return, exec, kitty --title float_kitty

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
config_file=~/.config/hypr/hyprland.conf
keybinds=$(grep -oP '(?<=bind = ).*' $config_file)
keybinds=$(echo "$keybinds" | sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
wofi -dmenu -p "Keybinds" <<< "$keybinds"