Created
December 5, 2014 03:27
-
-
Save jelera/2b61766b18c4ef99fd21 to your computer and use it in GitHub Desktop.
MATE Desktop Wallpaper Changer
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 | |
############################################################################### | |
## | |
## Name : mate_wallpaper_changer | |
## Usage : ./mate_wallpaper_changer | |
## Description : This script will randomly change the wallpaper image in the | |
## MATE Desktop, using a set interval. | |
## | |
## Last Updated : Thu 04 Dec 2014 09:23:46 PM CST | |
## | |
## Notes : It's recommended to run automatically at startup. | |
## | |
## Author : Jose Elera Campana <https://github.com/jelera> | |
## | |
## License : Copyright (c) 2014 Jose Elera Campana | |
## The MIT License | |
## | |
############################################################################### | |
while true; do | |
# SETTINGS | |
INTERVAL=360 # Time in seconds | |
WALLPAPER_DIR="$HOME/Pictures/Wallpapers" | |
# This will randomly select an image from the wallpaper directory | |
WALLPAPER_IMG=$(ls -d -1 $WALLPAPER_DIR/*.* | shuf -n1) | |
# Finally, setting the image as the current wallpaper | |
gsettings set org.mate.background picture-filename "$WALLPAPER_IMG" | |
sleep $INTERVAL | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment