aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts
diff options
context:
space:
mode:
Diffstat (limited to 'config/hypr/UserScripts')
-rwxr-xr-xconfig/hypr/UserScripts/Kool_Quick_Settings.sh84
-rwxr-xr-xconfig/hypr/UserScripts/QuickEdit.sh61
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh30
3 files changed, 97 insertions, 78 deletions
diff --git a/config/hypr/UserScripts/Kool_Quick_Settings.sh b/config/hypr/UserScripts/Kool_Quick_Settings.sh
new file mode 100755
index 00000000..a6dc2885
--- /dev/null
+++ b/config/hypr/UserScripts/Kool_Quick_Settings.sh
@@ -0,0 +1,84 @@
+#!/bin/bash
+# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
+# Rofi menu for Quick Edit/View of Settings (SUPER SHIFT E)
+
+# Define preferred text editor and terminal
+edit=${EDITOR:-nano}
+tty=kitty
+
+# variables
+configs="$HOME/.config/hypr/configs"
+UserConfigs="$HOME/.config/hypr/UserConfigs"
+rofi_theme="~/.config/rofi/config-edit.rasi"
+msg=' ⁉️ Choose what to do ⁉️'
+iDIR="$HOME/.config/swaync/images"
+scriptsDir="$HOME/.config/hypr/scripts"
+UserScripts="$HOME/.config/hypr/UserScripts"
+
+# Function to display the menu options without numbers
+menu() {
+ cat <<EOF
+view/edit ENV variables
+view/edit Window Rules
+view/edit User Keybinds
+view/edit User Settings
+view/edit Startup Apps
+view/edit Decorations
+view/edit Animations
+view/edit Laptop Keybinds
+view/edit Default Keybinds
+Configure Monitors (nwg-displays)
+Configure Workspace Rules (nwg-displays)
+Choose Hyprland Animations
+Choose Monitor Profiles
+Choose Rofi Themes
+Search for Keybinds
+EOF
+}
+
+# Main function to handle menu selection
+main() {
+ choice=$(menu | rofi -i -dmenu -config $rofi_theme -mesg "$msg")
+
+ # Map choices to corresponding files
+ case "$choice" in
+ "view/edit ENV variables") file="$UserConfigs/ENVariables.conf" ;;
+ "view/edit Window Rules") file="$UserConfigs/WindowRules.conf" ;;
+ "view/edit User Keybinds") file="$UserConfigs/UserKeybinds.conf" ;;
+ "view/edit User Settings") file="$UserConfigs/UserSettings.conf" ;;
+ "view/edit Startup Apps") file="$UserConfigs/Startup_Apps.conf" ;;
+ "view/edit Decorations") file="$UserConfigs/UserDecorations.conf" ;;
+ "view/edit Animations") file="$UserConfigs/UserAnimations.conf" ;;
+ "view/edit Laptop Keybinds") file="$UserConfigs/Laptops.conf" ;;
+ "view/edit Default Keybinds") file="$configs/Keybinds.conf" ;;
+ "Configure Monitors (nwg-displays)")
+ if ! command -v nwg-displays &>/dev/null; then
+ notify-send -i "$iDIR/ja.png" "Missing nwg-displays" "Install nwg-displays first"
+ exit 1
+ fi
+ nwg-displays ;;
+ "Configure Workspace Rules (nwg-displays)")
+ if ! command -v nwg-displays &>/dev/null; then
+ notify-send -i "$iDIR/ja.png" "Missing nwg-displays" "Install nwg-displays first"
+ exit 1
+ fi
+ nwg-displays ;;
+ "Choose Hyprland Animations") $scriptsDir/Animations.sh ;;
+ "Choose Monitor Profiles") $scriptsDir/MonitorProfiles.sh ;;
+ "Choose Rofi Themes") $scriptsDir/RofiThemeSelector.sh ;;
+ "Search for Keybinds") $scriptsDir/KeyBinds.sh ;;
+ *) return ;; # Do nothing for invalid choices
+ esac
+
+ # Open the selected file in the terminal with the text editor
+ if [ -n "$file" ]; then
+ $tty -e $edit "$file"
+ fi
+}
+
+# Check if rofi is already running
+if pidof rofi > /dev/null; then
+ pkill rofi
+fi
+
+main
diff --git a/config/hypr/UserScripts/QuickEdit.sh b/config/hypr/UserScripts/QuickEdit.sh
deleted file mode 100755
index 09530881..00000000
--- a/config/hypr/UserScripts/QuickEdit.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Rofi menu for Quick Edit/View of Settings (SUPER E)
-
-# Define preferred text editor and terminal
-edit=${EDITOR:-nano}
-tty=kitty
-
-# Paths to configuration directories
-configs="$HOME/.config/hypr/configs"
-UserConfigs="$HOME/.config/hypr/UserConfigs"
-rofi_theme="~/.config/rofi/config-edit.rasi"
-msg=' ⁉️ Choose which config to View or Edit ⁉️'
-
-# Function to display the menu options
-menu() {
- cat <<EOF
-1. ENV variables
-2. Window Rules
-3. Monitors
-4. User Keybinds
-5. User Settings
-6. Startup Apps
-7. Decorations
-8. Animations
-9. Workspace Rules
-10. Laptop Keybinds
-11. Default Keybinds
-EOF
-}
-
-# Main function to handle menu selection
-main() {
- choice=$(menu | rofi -i -dmenu -config $rofi_theme -mesg "$msg" | cut -d. -f1)
-
- # Map choices to corresponding files
- case $choice in
- 1) file="$UserConfigs/ENVariables.conf" ;;
- 2) file="$UserConfigs/WindowRules.conf" ;;
- 3) file="$UserConfigs/Monitors.conf" ;;
- 4) file="$UserConfigs/UserKeybinds.conf" ;;
- 5) file="$UserConfigs/UserSettings.conf" ;;
- 6) file="$UserConfigs/Startup_Apps.conf" ;;
- 7) file="$UserConfigs/UserDecorations.conf" ;;
- 8) file="$UserConfigs/UserAnimations.conf" ;;
- 9) file="$UserConfigs/WorkspaceRules.conf" ;;
- 10) file="$UserConfigs/Laptops.conf" ;;
- 11) file="$configs/Keybinds.conf" ;;
- *) return ;; # Do nothing for invalid choices
- esac
-
- # Open the selected file in the terminal with the text editor
- $tty -e $edit "$file"
-}
-
-# Check if rofi is already running
-if pidof rofi > /dev/null; then
- pkill rofi
-fi
-
-main
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index d75c2c15..32f9a93b 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -22,9 +22,9 @@ focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name')
monitor_width=$(hyprctl monitors -j | jq -r --arg mon "$focused_monitor" '.[] | select(.name == $mon) | .width')
scale_factor=$(hyprctl monitors -j | jq -r --arg mon "$focused_monitor" '.[] | select(.name == $mon) | .scale')
-# Calculate icon size for rofi
-icon_size=$(echo "scale=1; ($monitor_width * 14) / ($scale_factor * 100)" | bc)
-rofi_override="element-icon{size:${icon_size}px;}"
+icon_size=$(echo "scale=1; ($monitor_width * 3) / ($scale_factor * 400)" | bc)
+
+rofi_override="element-icon{size:${icon_size}%;}"
# swww transition config
FPS=60
@@ -74,7 +74,6 @@ swww query || swww-daemon --format xrgb
main() {
choice=$(menu | $rofi_command)
- # Trim any potential whitespace or hidden characters
choice=$(echo "$choice" | xargs)
RANDOM_PIC_NAME=$(echo "$RANDOM_PIC_NAME" | xargs)
@@ -94,7 +93,6 @@ main() {
exit 0
fi
- # Find the index of the selected file
pic_index=-1
for i in "${!PICS[@]}"; do
filename=$(basename "${PICS[$i]}")
@@ -143,16 +141,16 @@ if [[ -n "$choice" ]]; then
while read -r line; do
if echo "$line" | grep -q "yes"; then
- # Check if terminal exists
- if ! command -v "$terminal" &>/dev/null; then
- notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background"
- exit 1
- fi
+ # Check if terminal exists
+ if ! command -v "$terminal" &>/dev/null; then
+ notify-send -i "$iDIR/ja.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background"
+ exit 1
+ fi
- $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \
- sudo cp -r $wallpaper_current '$sddm_sequoia/backgrounds/default' && \
- notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'"
- break
+ $terminal -e bash -c "echo 'Enter your password to set wallpaper as SDDM Background'; \
+ sudo cp -r $wallpaper_current '$sddm_sequoia/backgrounds/default' && \
+ notify-send -i '$iDIR/ja.png' 'SDDM' 'Background SET'"
+ break
elif echo "$line" | grep -q "no"; then
echo "Wallpaper not set as SDDM background. Exiting."
break
@@ -160,6 +158,4 @@ if [[ -n "$choice" ]]; then
done &
fi
-fi
-
-
+fi \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage