Skip to content

Instantly share code, notes, and snippets.

@aobasar
Forked from dmpop/unsplash-random.sh
Last active September 19, 2017 05:14
Show Gist options
  • Save aobasar/c0320afef794d4e27e763c6fb84bfe34 to your computer and use it in GitHub Desktop.
Save aobasar/c0320afef794d4e27e763c6fb84bfe34 to your computer and use it in GitHub Desktop.
Use random photos from Unsplash as a desktop background on Ubuntu
#!/bin/bash
uuser="unsplash_user_name"
path="/home/aobasar/Pictures"
mkdir -p $path
size=$(xdpyinfo | grep dimensions | awk '{print $2}')
#if you dont care user
#curl "https://source.unsplash.com/user/$uuser/$size" --location --output $path/unsplash-random.jpeg
curl "https://source.unsplash.com/$size" --location --output $path/unsplash-random.jpeg
gsettings set org.gnome.desktop.background picture-uri file://$path/unsplash-random.jpeg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment