Last active
October 28, 2020 05:49
-
-
Save 51114u9/a7491ab9be6e65ce2521a3a66cf8ecdf to your computer and use it in GitHub Desktop.
Script to change desktop background in XFCE desktop
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
#!/usr/bin/env bash | |
# -*- coding: utf-8 -*- | |
# make this script executable and add it to the folder /etc/cron.hourly | |
path="/media/data/background" | |
if [ -d "$path" ]; then | |
filename=$(find $path -type f | shuf -n 1) | |
if [ -n "$filename" ]; then | |
xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/workspace0/last-image -s $filename | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment