Skip to content

Instantly share code, notes, and snippets.

@haykuro
Created September 8, 2016 02:42
Show Gist options
  • Save haykuro/c749d02817257a69b8c5aa3833eb06ea to your computer and use it in GitHub Desktop.
Save haykuro/c749d02817257a69b8c5aa3833eb06ea to your computer and use it in GitHub Desktop.
# 1-liner to download wallhaven wallpapers and save to a folder.
# set the folder as your default background
# cronjob
# …
# profit
curl -s "https://alpha.wallhaven.cc/random" | egrep -o "alpha.wallhaven.cc/wallpapers/thumb/small/th-\d+.jpg" | sed 's/^/http:\/\//g' | sed 's/thumb\/small\/th/full\/wallhaven/g' | xargs wget -c -P /tmp/random_wallpapers
@haykuro
Copy link
Author

haykuro commented Sep 8, 2016

doesn't account for non-jpegs, but works efficiently in most other regards.

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