Skip to content

Instantly share code, notes, and snippets.

@cuixin
Created December 20, 2018 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cuixin/55b1cbb2223534453312c84ee8060def to your computer and use it in GitHub Desktop.
Save cuixin/55b1cbb2223534453312c84ee8060def to your computer and use it in GitHub Desktop.
random desktop wallpaper from unsplash website.
#!/bin/bash
function wallpaper() {
# set -ex
query=$1
if [[ -z $query ]]; then
query="wallpaper"
fi
pic_path="/tmp/wallpaper.jpg"
wget "https://source.unsplash.com/random/1920x1080?$query" -O $pic_path
feh --no-fehbg --image-bg "#000000" --bg-max $pic_path
}
wallpaper $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment