This commit is contained in:
Stephan Raabe 2024-03-07 21:26:02 +01:00
parent f3cc851979
commit 5a80ddea9d

View File

@ -11,6 +11,7 @@
# Cache file for holding the current wallpaper
cache_file="$HOME/.cache/current_wallpaper"
blurred="$HOME/.cache/blurred_wallpaper.png"
rasi_file="$HOME/.cache/current_wallpaper.rasi"
# Create cache file if not exists
@ -70,11 +71,16 @@ source "$HOME/.cache/wal/colors.sh"
echo "Wallpaper: $wallpaper"
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
# -----------------------------------------------------
# Created blurred wallpaper
# -----------------------------------------------------
magick $wallpaper -blur 0x20 $blurred
# -----------------------------------------------------
# Write selected wallpaper into .cache files
# -----------------------------------------------------
echo "$wallpaper" > "$cache_file"
echo "* { current-image: url(\"$wallpaper\", height); }" > "$rasi_file"
echo "* { current-image: url(\"$blurred\", height); }" > "$rasi_file"
sleep 1