session: run shutdown script, clean up activation env before exit

This commit is contained in:
Andrew J. Hesford 2024-02-18 12:23:14 -05:00
parent 4ddeb3cd42
commit f90b7dca2a
6 changed files with 157 additions and 16 deletions

View file

@ -8,7 +8,7 @@ labwc - configuration files
Labwc uses openbox-3.6 specification for configuration and theming, but does not
support all options. The following files form the basis of the labwc
configuration: rc.xml, menu.xml, autostart and environment.
configuration: rc.xml, menu.xml, autostart, shutdown and environment.
No configuration files are needed to start and run labwc.
@ -34,11 +34,8 @@ alternative.
The configuration directory location can be override with the -C command line
option.
All configuration and theme files except autostart are re-loaded on receiving
signal SIGHUP.
The *autostart* file is executed as a shell script. This is the place for
executing clients for handling background images, panels and similar.
All configuration and theme files except autostart and shutdown are re-loaded on
receiving signal SIGHUP.
The *environment* file is parsed as *variable=value* and sets environment
variables accordingly. It is recommended to specify keyboard layout settings and
@ -48,6 +45,20 @@ sourced prior to running openbox.
Note: Tilde (~) and environment variables in the value are expanded, but
subshell syntax and apostrophes are ignored.
The *autostart* file is executed as a shell script after labwc has read its
configuration and set variables defined in the environment file. Additionally,
the environment variables WAYLAND_DISPLAY and (when labwc is built with Xwayland
support) DISPLAY will be defined. This is the place for executing clients for
handling background images, panels and other tasks that should run automatically
when labwc launches.
The *shutdown* file is executed as a shell script when labwc is preparing to
terminate itself. All environment variables, including WAYLAND_DISPLAY and
DISPLAY, will be available to the script. However, because the script runs
asynchronously with other termination tasks, the shutdown file should not assume
that the display will be usable. This file is useful to perform any custom
operations necessary to finalize a labwc session.
The *menu.xml* file defines the context/root-menus and is described in
labwc-menu(5).