-
-
Save jagamypriera/0ae0f52571b87c0762108b376141ac46 to your computer and use it in GitHub Desktop.
Use random photos from Unsplash as a desktop background on Elementary OS
This file contains hidden or 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 | |
path="/path/to/directory/" | |
size=$(xdpyinfo | grep dimensions | awk '{print $2}') | |
downloaded=$(date +%Y%m%d%H%M%S) | |
IFS='x' read -ra size <<< "$size" | |
curl "https://unsplash.it/${size[0]}/${size[1]}/?random" --location --output $path/unsplash-random-$downloaded.jpeg | |
gsettings set org.gnome.desktop.background picture-uri file://$path/unsplash-random-$downloaded.jpeg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment