Improve the wallpaper script even more
This commit is contained in:
parent
07a91ea136
commit
f289e97ced
2 changed files with 6 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue