Skip to content

Instantly share code, notes, and snippets.

@lassekongo83
Last active August 9, 2022 16:05
Show Gist options
  • Save lassekongo83/fc056caa32dc922bb1ee48b428116a26 to your computer and use it in GitHub Desktop.
Save lassekongo83/fc056caa32dc922bb1ee48b428116a26 to your computer and use it in GitHub Desktop.
Set a random wallpaper in GNOME.
#!/bin/bash
# A simple script to set a random wallpaper in GNOME
# Add the script to ~/.bash_profile or ~/.profile to run it at each login
# Change to your wallpaper location
DIR="$HOME/.local/share/backgrounds"
PIC=$(ls $DIR/* | shuf -n1)
gsettings set org.gnome.desktop.background picture-uri "file://$PIC"
gsettings set org.gnome.desktop.background picture-uri-dark "file://$PIC"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment