Skip to content

Instantly share code, notes, and snippets.

@nitheeshkm
Created November 9, 2021 15:40
Show Gist options
  • Save nitheeshkm/4206529581a6173b339cd623cee1aa4a to your computer and use it in GitHub Desktop.
Save nitheeshkm/4206529581a6173b339cd623cee1aa4a to your computer and use it in GitHub Desktop.
get wallpaper from unsplash and set it as background
#!/bin/bash
if [[ $(nmcli -t -f GENERAL.METERED dev show wlp111s0) = 'GENERAL.METERED:no (guessed)' ]]; then
wget -O /var/tmp/wallpaper.jpg https://source.unsplash.com/3840x1080/?wallpaper,mars &&
gsettings set org.gnome.desktop.background picture-uri file:///var/tmp/wallpaper.jpg
fi
eog /var/tmp/wallpaper.jpg
@nitheeshkm
Copy link
Author

wget -O /var/tmp/wallpaper.jpg https://source.unsplash.com/3840x1080/?ultrawide

@nitheeshkm
Copy link
Author

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