mirror of
https://github.com/labwc/labwc.git
synced 2025-11-01 22:58:47 -04:00
src/main.c: add environment variable LABWC_VER
src/config/session.c add env var LABWC_VER This could be useful going forward for helper programs such as `labwc-menu-generator` or `labwc-tweaks`
This commit is contained in:
parent
3b00aabd93
commit
4d3efb4339
2 changed files with 8 additions and 0 deletions
|
|
@ -191,6 +191,13 @@ main(int argc, char *argv[])
|
|||
wlr_log(WLR_DEBUG, "LABWC_PID=%s", pid);
|
||||
}
|
||||
|
||||
/* useful for helper programs */
|
||||
if (setenv("LABWC_VER", LABWC_VERSION, true) < 0) {
|
||||
wlr_log_errno(WLR_ERROR, "unable to set LABWC_VER");
|
||||
} else {
|
||||
wlr_log(WLR_DEBUG, "LABWC_VER=%s", LABWC_VERSION);
|
||||
}
|
||||
|
||||
if (!getenv("XDG_RUNTIME_DIR")) {
|
||||
wlr_log(WLR_ERROR, "XDG_RUNTIME_DIR is unset");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue