aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts
diff options
context:
space:
mode:
authorDonald Williams <129223418+dwilliam62@users.noreply.github.com>2025-09-23 20:05:01 -0400
committerGitHub <noreply@github.com>2025-09-23 20:05:01 -0400
commitf96dcf550c76e29a6fe4d6677563078ed8e2200d (patch)
tree15c57da8c5beb725984225e4692578d7add40e12 /config/hypr/UserScripts
parent70cb2274b35516802c1ee77b56f50f81ab68d32a (diff)
parentb4e0fda59b10440006b0a7bea5d8c0419d016eb0 (diff)
Merge branch 'development' into qs_overview_fix_v2
Diffstat (limited to 'config/hypr/UserScripts')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperEffects.sh58
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperSelect.sh22
-rwxr-xr-xconfig/hypr/UserScripts/Weather.py3
3 files changed, 53 insertions, 30 deletions
diff --git a/config/hypr/UserScripts/WallpaperEffects.sh b/config/hypr/UserScripts/WallpaperEffects.sh
index 2ba58d0c..ac8fc0e8 100755
--- a/config/hypr/UserScripts/WallpaperEffects.sh
+++ b/config/hypr/UserScripts/WallpaperEffects.sh
@@ -108,31 +108,41 @@ main
sleep 1
if [[ -n "$choice" ]]; then
- sddm_simple="/usr/share/sddm/themes/simple_sddm_2"
- if [ -d "$sddm_simple" ]; 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 SIMPLE SDDM v2 Theme" \
- --text-align=left \
- --title="SDDM Background" \
- --timeout=5 \
- --timeout-indicator=right \
- --button="yad-yes:0" \
- --button="yad-no:1" \
- ; then
+ # Resolve SDDM themes directory (standard and NixOS path)
+ 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
- # 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
+ if [ -n "$sddm_themes_dir" ]; then
+ 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 yad notification
+ if pidof yad > /dev/null; then
+ killall yad
+ fi
- exec $SCRIPTSDIR/sddm_wallpaper.sh --effects
-
+ if yad --info --text="Set current wallpaper as SDDM background?\n\nNOTE: This only applies to SIMPLE SDDM v2 Theme" \
+ --text-align=left \
+ --title="SDDM Background" \
+ --timeout=5 \
+ --timeout-indicator=right \
+ --button="yad-yes:0" \
+ --button="yad-no:1" \
+ ; 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
+
+ exec "$SCRIPTSDIR/sddm_wallpaper.sh" --effects
+ fi
fi
fi
-fi \ No newline at end of file
+fi
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
}
diff --git a/config/hypr/UserScripts/Weather.py b/config/hypr/UserScripts/Weather.py
index efa96813..a8b70417 100755
--- a/config/hypr/UserScripts/Weather.py
+++ b/config/hypr/UserScripts/Weather.py
@@ -59,7 +59,8 @@ status = html_data("div[data-testid='wxPhrase']").text()
status = f"{status[:16]}.." if len(status) > 17 else status
# status code
-status_code = html_data("#regionHeader").attr("class").split(" ")[2].split("-")[2]
+# Fix provided by mio-dokuhaki
+status_code = html_data("#regionHeader").attr("class").split(" ")[1].split("-")[0]
# status icon
icon = (
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage