Skip to content

Instantly share code, notes, and snippets.

@himalay
Last active June 22, 2024 19:00
Show Gist options
  • Save himalay/37031c529b1e4a04ad31 to your computer and use it in GitHub Desktop.
Save himalay/37031c529b1e4a04ad31 to your computer and use it in GitHub Desktop.
Sets random wallpaper every 30 minutes using feh(A lightweight and powerful image viewer).
#!/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
@bezlant
Copy link

bezlant commented Jul 2, 2022

Thank you, this works well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment