aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperSelect.sh
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-02-03 17:24:53 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-02-03 17:24:53 +0900
commit90fe32a08a1c6a9234916d5fab15c82851b0f0a2 (patch)
treef8619d735c712345fa0196af5cee4c2877ce110b /config/hypr/UserScripts/WallpaperSelect.sh
parentc7fd362a7c2c69434890ed5edfcea58d32cfeb53 (diff)
added support to make current wallpaper to SDDM (NOTE: need sequoia wallpaper)
Diffstat (limited to 'config/hypr/UserScripts/WallpaperSelect.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh26
1 files changed, 25 insertions, 1 deletions
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index 7d6b339f..043c3c96 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -5,6 +5,7 @@
# WALLPAPERS PATH
wallDIR="$HOME/Pictures/wallpapers"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
+iDIR="$HOME/.config/swaync/icons"
# variables
focused_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
@@ -106,4 +107,27 @@ wait $!
wait $!
sleep 2
-"$SCRIPTSDIR/Refresh.sh" \ No newline at end of file
+"$SCRIPTSDIR/Refresh.sh"
+
+sleep 2
+sddm_sequoia="/usr/share/sddm/themes/sequoia_2"
+if [ -d "$sddm_sequoia" ]; then
+ notify-send -i "$iDIR/picture.png" "Set wallpaper" "as SDDM background?" \
+ -t 10000 \
+ -A "yes=Yes" \
+ -A "no=No" \
+ -h string:x-canonical-private-synchronous:wallpaper-notify
+
+ # Wait for user input using a background process
+ dbus-monitor "interface='org.freedesktop.Notifications',member='ActionInvoked'" |
+ while read -r line; do
+ if echo "$line" | grep -q "yes"; then
+ # User chose "Yes", copy the wallpaper with correct syntax
+ pkexec /usr/bin/cp -r "$HOME/.config/hypr/wallpaper_effects/.wallpaper_current" "$sddm_sequoia/backgrounds/default"
+ notify-send -i "$iDIR/picture.png" "SDDM" "Background SET"
+ break
+ elif echo "$line" | grep -q "no"; then
+ break
+ fi
+ done &
+fi
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage