mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
23 lines
455 B
Bash
Executable File
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"
|