Skip to content

Instantly share code, notes, and snippets.

@primaryobjects
Created March 16, 2020 03:05
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 primaryobjects/1f0aa469456617851959a55952c4d014 to your computer and use it in GitHub Desktop.
Save primaryobjects/1f0aa469456617851959a55952c4d014 to your computer and use it in GitHub Desktop.
Automatically change Linux Mint Desktop Wallpaper by downloading a random image from unsplash.com
#!/bin/bash
#
# Add a cron job to run this script every 15 minutes.
# crontab -e
# */15 * * * * /home/YOUR_USER_NAME/Documents/unsplash.sh
#
USER=$(whoami)
# Delete cached wallpaper.
rm -f /home/$USER/.cache/wallpaper/*
# Download image.
wget -O /tmp/wallpaper.jpg https://source.unsplash.com/random
# Set new wallpaper.
gsettings set org.gnome.desktop.background picture-options "zoom"
gsettings set org.gnome.desktop.background picture-uri file:///tmp/wallpaper.jpg
@axi
Copy link

axi commented Nov 25, 2022

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