diff options
Diffstat (limited to 'config/hypr/scripts')
| -rwxr-xr-x | config/hypr/scripts/KeyBinds.sh | 30 | ||||
| -rwxr-xr-x | config/hypr/scripts/KeyHints.sh | 6 | ||||
| -rwxr-xr-x | config/hypr/scripts/PortalHyprland.sh | 2 | ||||
| -rwxr-xr-x | config/hypr/scripts/RefreshNoWaybar.sh | 4 | ||||
| -rwxr-xr-x | config/hypr/scripts/WaybarCava.sh | 1 | ||||
| -rwxr-xr-x | config/hypr/scripts/Wlogout.sh | 4 |
6 files changed, 41 insertions, 6 deletions
diff --git a/config/hypr/scripts/KeyBinds.sh b/config/hypr/scripts/KeyBinds.sh new file mode 100755 index 00000000..ccbb18a8 --- /dev/null +++ b/config/hypr/scripts/KeyBinds.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## +# Searchable enabled keybinds using rofi + +# Kill yad to not interfere with this binds +pkill yad || true + + +# 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..e2e12634 100755 --- a/config/hypr/scripts/KeyHints.sh +++ b/config/hypr/scripts/KeyHints.sh @@ -5,6 +5,11 @@ # GDK BACKEND. Change to either wayland or x11 if having issues BACKEND=wayland +# Check if rofi is running and kill it if it is +if pgrep -x "rofi" > /dev/null; then + pkill rofi +fi + # Detect monitor resolution and scale x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width') y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height') @@ -43,6 +48,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)" \ diff --git a/config/hypr/scripts/PortalHyprland.sh b/config/hypr/scripts/PortalHyprland.sh index d40f02ed..9bdf4b8c 100755 --- a/config/hypr/scripts/PortalHyprland.sh +++ b/config/hypr/scripts/PortalHyprland.sh @@ -1,6 +1,6 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# For manually starting xdg-desktop-portal +# For manually starting xdg-desktop-portal-hyprland sleep 1 killall xdg-desktop-portal-hyprland diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh index 70a4aeb3..8e20766b 100755 --- a/config/hypr/scripts/RefreshNoWaybar.sh +++ b/config/hypr/scripts/RefreshNoWaybar.sh @@ -1,9 +1,9 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# Modified version of Refresh but no waybar refresh +# Modified version of Refresh.sh but no waybar refreshing # Used by automatic wallpaper change -# Modified inorder to refresh rofi background, Wallust, SwayNC +# Modified inorder to refresh rofi background, Wallust, SwayNC only SCRIPTSDIR=$HOME/.config/hypr/scripts UserScripts=$HOME/.config/hypr/UserScripts diff --git a/config/hypr/scripts/WaybarCava.sh b/config/hypr/scripts/WaybarCava.sh index 3c4b0f53..99261387 100755 --- a/config/hypr/scripts/WaybarCava.sh +++ b/config/hypr/scripts/WaybarCava.sh @@ -1,6 +1,5 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## - # Not my own work. This was added through Github PR. Credit to original author #----- Optimized bars animation without much CPU usage increase -------- diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh index 531c7c66..b7cc220d 100755 --- a/config/hypr/scripts/Wlogout.sh +++ b/config/hypr/scripts/Wlogout.sh @@ -1,9 +1,9 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## - # wlogout (Power, Screen Lock, Suspend, etc) -# Set variables for parameters +# Set variables for parameters. First numbers corresponts to Monitor Resolution +# i.e 2160 means 2160p A_2160=700 B_2160=700 A_1600=480 |
