If you want to add a new mode, please make sure to check the following:
- [] Create a new
.pyfile inWallpaperGeneratorfolder with the name of the mode; - [] Import the new method in the
WallpaperGeneratorclass, making sure to follow the same alias pattern; - [] Add
generate_methodNamemethod inside the WallPaperGenerator class; - [] add the new mode in the
modesarray in themain.pyfile, line36; - [] Add the
elifstatement inmain.pyfile, functionchange_wallpaper_periodically; - [] If needed, add any new dependency in the
requirements.txtfile. It would be better to use a virtual environment and add the dependency by runningpip freeze > requirements.txtin the terminal. - [] Add a new image in the
src/imgfolder, with the same name of the mode file, but with a.pngextension; - [] Add the image in the
README.mdfile, adding it also in the paragraph that describes the mode;
Frankly, I'm not sure yet how the script should handle different desktop environments. Currently, the workflow is handled by handler.py file:
- there is a
self.availableEnvironmentsarray, in which every element is a dictionary with the followingenvName: the name of the desktop environmenttestCommand: the command to check if the desktop environment is installedcommand: the command to set the wallpaperwallpaperPath: the path where the original wallpaper is stored
- the
get_environmentmethod checks which desktop environment is installed and returns the corresponding dictionary by checking thetestCommandcommand
I don't know if this is the best way to handle different desktop environments, so I'm open to suggestions. However, if you want to add a new desktop environment, you should:
- [] Add a new dictionary in the
self.availableEnvironmentsarray in thehandler.pyfile, following the same pattern. Please pay attention to support also the dark mode, in case the desktop environment handle it differently from the light one; - Test it! I don't have the possibility to test all the desktop environments, so please make sure that the script works on your specific desktop environment, even by running it in different machines if applicable.
- Remember that all the logic to create the wallpaper is independent from the desktop environment, so you don't have to worry about that. The only thing to do change is the way the wallpaper is set.
If you have other ideas, bigger than the previous ones (such as the GUI, the GNOME extension, Android compatibility, etc.), please open an issue and let's discuss it together. I'm open to any kind of contribution, so don't be shy!