README.org | ||
sample_config.toml | ||
wallman.py | ||
wallman_lib.py |
Readme
Overwiev
What is this?
This is my project wallman. Wallman is a simple python program used for setting Dynamic Wallpapers on minimalist X11 Window Managers and Wayland compositors. The name is a reference to [[https://www.youtube.com/watch?v=k4Q3qD93rgI&t=131s][TomSka]]. This version is an early Alpha. As of now, it supports the most important features for my usecase, those being randomly selected wallpaper sets and wallpaper sets that change by the time of day. The program is not modular yet and I would expect a lot of bugs related to the configuration file. Just how it is, I'm working on it. As such, please make absolutely sure you follow the instructions on how to write the config file very closely. I will implement better config handling with more meaningful error output in the future. For now, follow everything really closely and read the logs if needed. If you do that, it should work.
What can it do?
Wallman currently has three main features:
- Reading configuration details from a TOML file
- Choosing from a set of Wallpapers and then setting the rest of the wallpapers accordingly
- Settings Wallpapers at a specific time of the day
Installation
Requirements
- Python 3.11 or newer (Required because of tomllib)
- APScheduler (Install python-apscheduler or APScheduler, depending on the package manager)
- feh (Used for setting the wallpapers, hard dependency)
How to install it?
- Clone this git repo
- Create a log file and a configuration file:
mkdir -p ~/.local/share/wallman
mkdir -p ~/.config/wallman
touch ~/.local/share/wallman/wallman.log
cp sample_config.toml ~/.config/wallman/wallman.toml
- Adjust the loglevel to your liking. This will be part of the config or a command line argument soon.
- Profit
Configuration
This is a short guide on how to correctly configure wallman. Look in the sample config for additional context.
TOML Dictionaries
First of all, the config file is structured via different TOML dictionaries. There are two TOML dictionaries: wallpaper_sets and changing_times that must be present in every config. Aside from that, further dictionaries are needed depending on how wallman is configured. You need to create a dictionary with the name of each wallpaper set defined in the used_sets list (more on that later). You should probably just configure wallman by editing the sample config as it is by far the easiest way to do it.
wallpaper_sets
In wallpaper_sets, you need to always define 3 variables:
- enabled: bool A simple switch that states if you want to use different sets of wallpapers or not.
- used_sets: list A list that includes the names of the wallpaper sets you want to use. If you want to use only one, the list should have one entry.
- wallpapers_per_set: int The amount of wallpapers that you use in each set. It should be an integer.
changing_times
The changing_times dictionary is used to specify the times of the day when your wallpaper is switched. The names of the keys do not matter here, the values must always be strings in the "XX:YY:ZZ" 24 hour time system. use 00:00:00 for midnight. Note that XX should be in the range of 00-23 and YY and ZZ should be in the range of 00-59.
The other dictionaries
The other dictionaries must always have the names of the wallpaper sets from used_sets. If you have one wallpaper set, you need one additional dictionary, if you have two you need two etc. The standard config uses nature and anime, these names can be whatever you please as long as they are the same as the ones specified in used_sets. The keys in the dictionary once again do not matter, the names of the keys in each dictionary must be strings and be absolute paths. They should not include spaces unless prefaced by a backslash.
TODOs
Structuring
- Write unittests
- Write a setup.py
- Improve the general directory layout
Technical Details
- Improve Modularity
- Make the enabled flag in wallpaper_sets actually useful by making the used_sets field optional
- Improve output in cases of error
- Add support for different loglevels in the config file or as a command line argument
- Drop the feh dependecy and set wallpapers using pywlroots or python-xlib
Features
- Add support for wallpapers that dynamically change with the time of day (Morning, noon, evening, night or light levels) rather than to times set in the config
- Add support for wallpapers that change by the weather
- Add support for live wallpapers