Last active
January 26, 2024 19:50
-
-
Save HusseinElMotayam/fe39f7e2d7a55e182d503fd793cb7aa2 to your computer and use it in GitHub Desktop.
Bash script to fetch random wallpapers from Unsplash and set it on Ubuntu.
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
#!/bin/bash | |
wget -O /tmp/wallpaper.jpg https://source.unsplash.com/3840x2160/?wallpapers | |
gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg | |
gsettings set org.gnome.desktop.screensaver picture-uri file:///tmp/wallpaper.jpg | |
# Don't forget to make it executable via: chmod +x random-wallpaper.sh | |
# To schedule every 10 minutes: | |
# Run: crontab -e | |
# Add the following: */10 * * * * /path/to/random-wallpaper | |
# Save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for the wonderful source of random backgrounds!