mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-02-04 14:42:04 +00:00
Use dotter
This commit is contained in:
22
local/bin/set-animated-bg
Executable file
22
local/bin/set-animated-bg
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/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"
|
||||
Reference in New Issue
Block a user