aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts
diff options
context:
space:
mode:
authorJa.KooLit <85185940+JaKooLit@users.noreply.github.com>2024-09-20 19:02:39 +0900
committerGitHub <noreply@github.com>2024-09-20 19:02:39 +0900
commit2b715deacefc61247ca15ed8527730c0537407f1 (patch)
tree17cb1dbbba207b5b22d647853fd0d8945a487560 /config/hypr/scripts
parent50d110bf76233350c9478bb6b107c67758fcb234 (diff)
parente1e8a5d54a47d04488d42e9141d414874cf83838 (diff)
Merge pull request #453 from JaKooLit/development
Development to Main
Diffstat (limited to 'config/hypr/scripts')
-rwxr-xr-xconfig/hypr/scripts/KeyBinds.sh30
-rwxr-xr-xconfig/hypr/scripts/KeyHints.sh6
-rwxr-xr-xconfig/hypr/scripts/PortalHyprland.sh2
-rwxr-xr-xconfig/hypr/scripts/RefreshNoWaybar.sh4
-rwxr-xr-xconfig/hypr/scripts/WaybarCava.sh1
-rwxr-xr-xconfig/hypr/scripts/Wlogout.sh4
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage