solorice/local/bin/set-animated-bg
Kristofers Solo a42ded1119 Use dotter
2024-08-28 09:02:07 +03:00

23 lines
455 B
Bash
Executable File

#!/usr/bin/env bash
# Directory containing the videos
VIDEO_DIR="${HOME}/Pictures/wallpapers/animated/wallset"
# List all video files in the directory
VIDEOS=($(ls $VIDEO_DIR/*))
# Check if there are any videos in the directory
if [ ${#VIDEOS[@]} -eq 0 ]; then
echo "No videos found in $VIDEO_DIR."
exit 1
fi
# Select a random video
RANDOM_VIDEO=${VIDEOS[$((RANDOM % ${#VIDEOS[@]}))]}
# Play the selected v
wallset --video "$RANDOM_VIDEO"