diff options
| author | JaKooLit <ejhay.games@gmail.com> | 2024-09-20 02:23:55 +0900 |
|---|---|---|
| committer | JaKooLit <ejhay.games@gmail.com> | 2024-09-20 02:23:55 +0900 |
| commit | 3056d2060700d35b37b05634e226c734304a5efe (patch) | |
| tree | 8ecd99cdce93da4ef374a83739744cb75446e7a7 /config/hypr/scripts | |
| parent | 0088ba45b72b01314a8f1d9ec976874d4d2d9e5c (diff) | |
Added Searchable Keybinds using rofi
Default Keybind SUPER SHIFT K
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/KeyBinds.sh | 27 | ||||
| -rwxr-xr-x | config/hypr/scripts/KeyHints.sh | 1 |
2 files changed, 28 insertions, 0 deletions
diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh new file mode 100755 index 00000000..29217910 --- /dev/null +++ b/config/hypr/scripts/KeyBinds.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Searchable enabled keybinds using rofi + +# Define the config files +KEYBINDS_CONF="$HOME/.config/hypr/configs/Keybinds.conf" +USER_KEYBINDS_CONF="$HOME/.config/hypr/UserConfigs/UserKeybinds.conf" +LAPTOP_CONF="$HOME/.config/hypr/UserConfigs/Laptop.conf" + +# Combine the contents of the keybinds files and filter for keybinds +KEYBINDS=$(cat "$KEYBINDS_CONF" "$USER_KEYBINDS_CONF" | grep -E '^(bind|bindl|binde|bindm)') + +# Check if Laptop.conf exists and add its keybinds if present +if [[ -f "$LAPTOP_CONF" ]]; then + LAPTOP_BINDS=$(grep -E '^(bind|bindl|binde|bindm)' "$LAPTOP_CONF") + KEYBINDS+=$'\n'"$LAPTOP_BINDS" +fi + +# Check if we have any keybinds to display +if [[ -z "$KEYBINDS" ]]; then + echo "No keybinds found." + exit 1 +fi + +# Use rofi to display the keybinds +echo "$KEYBINDS" | rofi -dmenu -i -p "Keybinds" -config ~/.config/rofi/config-keybinds.rasi diff --git a/config/hypr/scripts/KeyHints.sh b/config/hypr/scripts/KeyHints.sh index 0f8a989a..3534f2e4 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -43,6 +43,7 @@ GDK_BACKEND=$BACKEND yad --width=$dynamic_width --height=$dynamic_height \ "ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \ " enter" "Terminal" "(kitty)" \ " SHIFT enter" "DropDown Terminal" "(kitty-pyprland)" \ +" SHIFT K" "Searchable Keybinds" "(Keybinds)" \ " A" "Desktop Overview" "(AGS Overview)" \ " D" "App Launcher" "(rofi-wayland)" \ " T" "Open File Manager" "(Thunar)" \ |
