diff --git a/README.md b/README.md index a408c1a..95eafcd 100644 --- a/README.md +++ b/README.md @@ -79,9 +79,10 @@ vim +PlugClean # remove plugins no longer in the list ## Wallpaper -The wallpaper is randomly set from images (png, jpg and jpeg) from -`~/pictures/wallpapers/enabled/`. You should populate this directory with -symbolic links pointing to images stored in `~/pictures/wallpapers/`. +The wallpaper is randomly selected from images (png, jpg and jpeg) located in +the `$HOME/pictures/wallpapers/` directory. + +Specific wallpapers for winter can be set in the `winter` sub-directory. ## /etc/locale.conf diff --git a/bin/set_wallpaper b/bin/set_wallpaper index 014518d..4f09ae5 100755 --- a/bin/set_wallpaper +++ b/bin/set_wallpaper @@ -4,7 +4,7 @@ set -euo pipefail IFS=$'\n\t' HYPRPAPER_CNF="$HOME/.config/hypr/hyprpaper.conf" -WALLPAPER_DIR="$HOME/pictures/wallpapers/enabled" +WALLPAPER_DIR="$HOME/pictures/wallpapers" WALLPAPER_DIR_WINTER="$WALLPAPER_DIR/winter" # Set the wallpaper directory based on the current month @@ -18,7 +18,7 @@ esac # Generate the configuration if [ -d "$WALLPAPER_DIR" ]; then - WALLPAPER_FILE="$(find "$WALLPAPER_DIR" -maxdepth 1 -type f -print | shuf | head -n 1)" + WALLPAPER_FILE="$(find "$WALLPAPER_DIR" -maxdepth 1 -type f \( -iname "*\.png" -o -iname "*\.jpg" -o -iname "*\.jpeg" \) -print | shuf | head -n 1)" if [ -L "$WALLPAPER_FILE" ]; then WALLPAPER_FILE="$(readlink -f "$WALLPAPER_FILE")" fi