-
-
Notifications
You must be signed in to change notification settings - Fork 56
Project Structure
The most important modules are:
-
main.py: main entry point. Parses arguments, sets up logging and starts desired actions -
yin_yang.py: changes the theme in all activated plugins. Is called by the systemd service or the user (with the--toggleoption) -
config.py: handles the configuration by loading and saving the config json file -
daemon_handler.py: starts, updates and stops the systemd timer and unit for theme scheduling
In the ui package are the automatically compiled main_window.py and the main_window_connector.py, which registers button and input events to update the configuration. It uses resources.py (also a generated python script) in the root to load icons and translations. Both generated files can be updated with scripts/build_ui.sh.
All plugins are located in the plugins package and subclass a plugin class in _plugins.py. They get loaded by plugins/__init__.py.
External plugins (such as the Firefox plugin) call communicate.py to retrieve the configuration to schedule a change by themselves.
Tests are located under tests.py and can be run with python -m unittest discover -s ./tests -t . (assuming you are in the project root).