Last active
August 9, 2022 16:05
-
-
Save lassekongo83/fc056caa32dc922bb1ee48b428116a26 to your computer and use it in GitHub Desktop.
Set a random wallpaper in GNOME.
This file contains 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 | |
# 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