Automatically change your wallpaper folder on KDE desktop
To install this script you have to run, with root privileges, setup.py install using python3.
[sudo] python[3] setup.py install
Python 3
PyYAML
All those requirements are checked and satisfied by setup.py
In order to work properly theme_changer.py need a correct configuration
- Create a directory named '.wallpapers' in your home directory. You can place your wallpaper collection here or anywhere else.
- Create a file named 'config.yml' in ~/.wallpapers
- Fill your configuration file your seasons
- Create a softlink named 'current' in ~/.wallpapers. This link should target your current wallpaper directory
- Configure KDE to use ~/.wallpapers/current as wallpaper location
- Configure your desktop to autorun theme_changer.py at startup. No commands line arguments are needed. For example:
cd ~/.config/autostart-scripts
ln -s $(which theme_changer.py) theme_changer
You can add and remove all season that you want any time you want but before it takes effect you must logout and login to force Plasma to restart. If you run the script during the desktop execution it will break the softlink and crash the slideshow, if this happens you just have to restart KDE(logout-login).
A season is a YAML entry. It have any kind of fantasy name(but NOT 'default') and must be unique. Inside each season must be present those three entries:
- from day-month : defines when a season starts
- to day-month : defines when a season ends
- dir path: define ~/.wallpapers/current during this season.
There can be any number of season, the only mandatory season is default, that define the behavior where none of the other season matches.
Default season has just one entry:
- dir path: define ~/.wallpapers/current when none of the other season matches.
Read 'config.yml' for an example configuration.