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/WallpaperEffects.sh8
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh15
3 files changed, 20 insertions, 87 deletions
diff --git a/config/hypr/UserScripts/Kool_Quick_Settings.sh b/config/hypr/UserScripts/Kool_Quick_Settings.sh
deleted file mode 100755
index 7b41512e..00000000
--- a/config/hypr/UserScripts/Kool_Quick_Settings.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
-# Rofi menu for KooL Hyprland Quick 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="$HOME/.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" "E-R-R-O-R" "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" "E-R-R-O-R" "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/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh
index eb87b97b..7b1cf00b 100755
--- a/config/hypr/UserScripts/WallpaperEffects.sh
+++ b/config/hypr/UserScripts/WallpaperEffects.sh
@@ -105,10 +105,16 @@ sleep 1
if [[ -n "$choice" ]]; then
sddm_sequoia="/usr/share/sddm/themes/sequoia_2"
if [ -d "$sddm_sequoia" ]; then
+
+ # Check if yad is running to avoid multiple yad notification
+ if pidof yad > /dev/null; then
+ killall yad
+ fi
+
if yad --info --text="Set current wallpaper as SDDM background?\n\nNOTE: This only applies to SEQUOIA SDDM Theme" \
--text-align=left \
--title="SDDM Background" \
- --timeout=10 \
+ --timeout=5 \
--timeout-indicator=right \
--button="yad-yes:0" \
--button="yad-no:1" \
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index 88b06dd6..cf677f9c 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -12,6 +12,12 @@ wallpaper_current="$HOME/.config/hypr/wallpaper_effects/.wallpaper_current"
iDIR="$HOME/.config/swaync/images"
iDIRi="$HOME/.config/swaync/icons"
+# Check if package bc exists
+if ! command -v bc &>/dev/null; then
+notify-send -i "$iDIR/ja.png" "bc missing" "Install package bc first"
+exit 1
+fi
+
# variables
rofi_theme="$HOME/.config/rofi/config-wallpaper.rasi"
focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name')
@@ -28,7 +34,6 @@ adjusted_icon_size=$(echo "$icon_size" | awk '{if ($1 < 15) $1 = 20; if ($1 > 25
# Setting the rofi override with the adjusted icon size
rofi_override="element-icon{size:${adjusted_icon_size}%;}"
-
# swww transition config
FPS=60
TYPE="any"
@@ -133,10 +138,16 @@ sleep 1
if [[ -n "$choice" ]]; then
sddm_sequoia="/usr/share/sddm/themes/sequoia_2"
if [ -d "$sddm_sequoia" ]; then
+
+ # Check if yad is running to avoid multiple yad notification
+ if pidof yad > /dev/null; then
+ killall yad
+ fi
+
if yad --info --text="Set current wallpaper as SDDM background?\n\nNOTE: This only applies to SEQUOIA SDDM Theme" \
--text-align=left \
--title="SDDM Background" \
- --timeout=10 \
+ --timeout=5 \
--timeout-indicator=right \
--button="yad-yes:0" \
--button="yad-no:1" \
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage