-
-
Save T2Knock/8cf7303c61b75a8256974251b8ecf35e to your computer and use it in GitHub Desktop.
Sets random wallpaper every 30 minutes using feh(A lightweight and powerful image viewer).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
img=(`find ~/pictures/wallpapers/ -name '*' -exec file {} \; | grep -o -P '^.+: \w+ image' | cut -d':' -f1`) | |
while true | |
do | |
feh --bg-scale "${img[$RANDOM % ${#img[@]} ]}" | |
sleep 30m | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Single line using shuf
shuf -e -n1 ~/Pictures/nordic-wallpapers/wallpapers/* | xargs feh --bg-scale