Files
dots/configs/niri_l/scripts/swaybg-random.sh

15 lines
379 B
Bash
Raw Normal View History

2025-12-21 00:52:59 -08:00
#!/usr/bin/env sh
# Wallpaper directory
WP_FOLDER=/home/toniizk/Pictures/Backgrounds
# Find a random image file (supports png/jpg, add more extensions if needed)
FILE=$(find "$WP_FOLDER" -type f \( -name '*.png' -o -name '*.jpg' \) | shuf -n1)
# Kill any existing swaybg process
killall swaybg
# Start a new swaybg instance with the random image
swaybg -i "$FILE" -m fill &