add files

This commit is contained in:
2026-06-06 12:24:00 +02:00
commit 22296aa139
22 changed files with 3425 additions and 0 deletions
Executable
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
# Directory containing wallpapers
wallpaper_dir=~/Pictures/Wallpapers
# Function to recursively find image files
find_images() {
find "$1" -type f \( -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -o -name "*.gif" \)
}
# Check if the wallpaper directory exists and is not empty
if [[ -d $wallpaper_dir && $(find_images "$wallpaper_dir") ]]; then
# Select a random wallpaper from all image files (including subdirectories)
random_wallpaper=$(find_images "$wallpaper_dir" | shuf -n 1)
# Set the wallpaper using awww with transition effects
awww img "$random_wallpaper" --transition-step 100 --transition-type wipe --transition-angle 30
wal -i "$random_wallpaper" -n
echo "Wallpaper set to: $random_wallpaper"
else
echo "Wallpaper directory is either missing or does not contain any images."
fi