aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/keybindings.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/scripts/keybindings.sh')
-rwxr-xr-xconfig/hypr/scripts/keybindings.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/config/hypr/scripts/keybindings.sh b/config/hypr/scripts/keybindings.sh
new file mode 100755
index 00000000..b6ee6e25
--- /dev/null
+++ b/config/hypr/scripts/keybindings.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Define keybindings.conf location
+# -----------------------------------------------------
+config_file="~/.config/hypr/configs/Keybinds.conf"
+
+# -----------------------------------------------------
+# Parse keybindings
+# -----------------------------------------------------
+keybinds=$(grep -oP '(?<=bind = ).*' $config_file)
+keybinds=$(echo "$keybinds" | sed 's/$mainMod/SUPER/g'| sed 's/,\([^,]*\)$/ = \1/' | sed 's/, exec//g' | sed 's/^,//g')
+
+# -----------------------------------------------------
+# Show keybindings in rofi
+# -----------------------------------------------------
+rofi -dmenu -p "Keybinds" -config ~/.config/rofi/config-short <<< "$keybinds" \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage