Created
February 25, 2018 06:28
-
-
Save euclaise/942470c1dbffa514a4aa0822e7b62bff to your computer and use it in GitHub Desktop.
Grabs a random wallpaper from alpha.wallhaven.cc
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 | |
ID=$(curl -s "https://alpha.wallhaven.cc/search?sorting=random" | grep -oP 'thumb-(\d+)' | head -n 1 | tr -d "thumb-") | |
curl -O "https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-$ID.jpg" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment