From a153022b7d457466db9140c62dc5564f9de7a3af Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 5 Nov 2023 14:02:06 +0900 Subject: changes for new Hyprland-Dots --- config/hypr/scripts/keybindings.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 config/hypr/scripts/keybindings.sh (limited to 'config/hypr/scripts/keybindings.sh') 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 -- cgit v1.2.3