aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/UserScripts/WallpaperRandom.sh
diff options
context:
space:
mode:
authorMartin Guzman <55927935+brockar@users.noreply.github.com>2026-01-21 16:18:43 -0300
committerGitHub <noreply@github.com>2026-01-21 16:18:43 -0300
commitc6198c1bedeffd08ec3f60f7ba3a41e6c5870885 (patch)
tree458c030873b4e70ff9eda0baed5df257434871f4 /config/hypr/UserScripts/WallpaperRandom.sh
parent7dedbe3d4a4560ac15987fdf8164dbbb1f4701bf (diff)
parent88a09344e8cc7cffe69a017eb752e8c6fa17ddcb (diff)
Merge pull request #927 from JaKooLit/development
Merge Development to main branch for release
Diffstat (limited to 'config/hypr/UserScripts/WallpaperRandom.sh')
-rwxr-xr-xconfig/hypr/UserScripts/WallpaperRandom.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/config/hypr/UserScripts/WallpaperRandom.sh b/config/hypr/UserScripts/WallpaperRandom.sh
index 654d4bd3..8dd680d5 100755
--- a/config/hypr/UserScripts/WallpaperRandom.sh
+++ b/config/hypr/UserScripts/WallpaperRandom.sh
@@ -2,12 +2,13 @@
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
# Script for Random Wallpaper ( CTRL ALT W)
-wallDIR="$HOME/Pictures/wallpapers"
+PICTURES_DIR="$(xdg-user-dir PICTURES 2>/dev/null || echo "$HOME/Pictures")"
+wallDIR="$PICTURES_DIR/wallpapers"
SCRIPTSDIR="$HOME/.config/hypr/scripts"
focused_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .name')
-PICS=($(find -L ${wallDIR} -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.pnm" -o -name "*.tga" -o -name "*.tiff" -o -name "*.webp" -o -name "*.bmp" -o -name "*.farbfeld" -o -name "*.gif" \)))
+PICS=($(find -L "${wallDIR}" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.pnm" -o -name "*.tga" -o -name "*.tiff" -o -name "*.webp" -o -name "*.bmp" -o -name "*.farbfeld" -o -name "*.gif" \)))
RANDOMPICS=${PICS[ $RANDOM % ${#PICS[@]} ]}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage