aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperSelect.sh
diff options
context:
space:
mode:
authorDonald Williams <129223418+dwilliam62@users.noreply.github.com>2025-10-13 20:31:53 -0400
committerGitHub <noreply@github.com>2025-10-13 20:31:53 -0400
commite4be12e23fa8d6f8a73dde974ea6adf242885bc1 (patch)
treeb879abcf54989120a0931443bfb8203c885c2b20 /config/hypr/UserScripts/WallpaperSelect.sh
parent0e52d19b894e3cfd2c87cfbcc35ae087d48f5485 (diff)
parent9d26c191c1071a542e816d1bc2b0b3f96ebfa74d (diff)
Merge pull request #841 from JaKooLit/ddubs-hyprsunset
Merge ddubs-hyprsunset into main fixes for wallust, sddm and weather
Diffstat (limited to 'config/hypr/UserScripts/WallpaperSelect.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/config/hypr/UserScripts/WallpaperSelect.sh b/config/hypr/UserScripts/WallpaperSelect.sh
index a08b53ce..466832ba 100755
--- a/config/hypr/UserScripts/WallpaperSelect.sh
+++ b/config/hypr/UserScripts/WallpaperSelect.sh
@@ -101,9 +101,21 @@ menu() {
# Offer SDDM Simple Wallpaper Option (only for non-video wallpapers)
set_sddm_wallpaper() {
sleep 1
- sddm_simple="/usr/share/sddm/themes/simple_sddm_2"
- if [ -d "$sddm_simple" ]; then
+ # Resolve SDDM themes directory (standard and NixOS path)
+ local sddm_themes_dir=""
+ if [ -d "/usr/share/sddm/themes" ]; then
+ sddm_themes_dir="/usr/share/sddm/themes"
+ elif [ -d "/run/current-system/sw/share/sddm/themes" ]; then
+ sddm_themes_dir="/run/current-system/sw/share/sddm/themes"
+ fi
+
+ [ -z "$sddm_themes_dir" ] && return 0
+
+ local sddm_simple="$sddm_themes_dir/simple_sddm_2"
+
+ # Only prompt if theme exists and its Backgrounds directory is writable
+ if [ -d "$sddm_simple" ] && [ -w "$sddm_simple/Backgrounds" ]; then
# Check if yad is running to avoid multiple notifications
if pidof yad >/dev/null; then
@@ -123,9 +135,9 @@ set_sddm_wallpaper() {
notify-send -i "$iDIR/error.png" "Missing $terminal" "Install $terminal to enable setting of wallpaper background"
exit 1
fi
-
- exec $SCRIPTSDIR/sddm_wallpaper.sh --normal
-
+
+ exec "$SCRIPTSDIR/sddm_wallpaper.sh" --normal
+
fi
fi
}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage