Improve the wallpaper script even more
This commit is contained in:
parent
07a91ea136
commit
f289e97ced
2 changed files with 6 additions and 5 deletions
|
@ -79,9 +79,10 @@ vim +PlugClean # remove plugins no longer in the list
|
||||||
|
|
||||||
## Wallpaper
|
## Wallpaper
|
||||||
|
|
||||||
The wallpaper is randomly set from images (png, jpg and jpeg) from
|
The wallpaper is randomly selected from images (png, jpg and jpeg) located in
|
||||||
`~/pictures/wallpapers/enabled/`. You should populate this directory with
|
the `$HOME/pictures/wallpapers/` directory.
|
||||||
symbolic links pointing to images stored in `~/pictures/wallpapers/`.
|
|
||||||
|
Specific wallpapers for winter can be set in the `winter` sub-directory.
|
||||||
|
|
||||||
|
|
||||||
## /etc/locale.conf
|
## /etc/locale.conf
|
||||||
|
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
|
|
||||||
HYPRPAPER_CNF="$HOME/.config/hypr/hyprpaper.conf"
|
HYPRPAPER_CNF="$HOME/.config/hypr/hyprpaper.conf"
|
||||||
WALLPAPER_DIR="$HOME/pictures/wallpapers/enabled"
|
WALLPAPER_DIR="$HOME/pictures/wallpapers"
|
||||||
WALLPAPER_DIR_WINTER="$WALLPAPER_DIR/winter"
|
WALLPAPER_DIR_WINTER="$WALLPAPER_DIR/winter"
|
||||||
|
|
||||||
# Set the wallpaper directory based on the current month
|
# Set the wallpaper directory based on the current month
|
||||||
|
@ -18,7 +18,7 @@ esac
|
||||||
|
|
||||||
# Generate the configuration
|
# Generate the configuration
|
||||||
if [ -d "$WALLPAPER_DIR" ]; then
|
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
|
if [ -L "$WALLPAPER_FILE" ]; then
|
||||||
WALLPAPER_FILE="$(readlink -f "$WALLPAPER_FILE")"
|
WALLPAPER_FILE="$(readlink -f "$WALLPAPER_FILE")"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue