The samurai-x application object is the central point of the window manager. There is only one instance of App in one samurai-x process and it handles the connection to the X server, the event loop and the plugin loading process.
Every builtin samurai-x object should have an app member you can access.
Events:
Members:
This method establishes a connection to the X server and turns on the synchronous checks if self.synchronous_check is True (that means that you get X exceptions synchronously). The rest:
- It loads all plugins and checks if there is a plugin providing the required ‘desktop’ key.
- It gets all screens, creates Screen instances and dispatches the ‘on_new_screen’ on self.
- It configures signal handlers for SIGINT, SIGTERM, SIGHUP (all these signals will gracefully shut down samurai-x)
- It calls self.reload_config() that initially loads the config and dispatches ‘on_load_config’
- It dispatches ‘on_ready’
- It calls scan on each Screen to make it scan for children.
| Todo: | allow the user to specify the X connection string. Maybe he wants to connect to a foreign display without changing the DISPLAY environment variable? |
|---|
(Re)load the config and dispatch the ‘on_load_config’ event with the new configuration as the first argument. All plugins should reload their configuration variables when receiving that, although we have to think a bit about the way we want to realize that :)
| Todo: | config is not really re-loaded yet. That should really be fixed. |
|---|