diff options
author | Joshua Yun <joshua@joshuayun.com> | 2025-03-31 23:24:56 -0500 |
---|---|---|
committer | Joshua Yun <joshua@joshuayun.com> | 2025-03-31 23:24:56 -0500 |
commit | 9c7860886279977bf5d7a9792bae931ae5363a3f (patch) | |
tree | 23eea47ac9e121fb5586104ea314a6a8a2007e3d /dwl.c | |
parent | b38b5e28d9f28a9382a290461fb12c7a58d19256 (diff) | |
download | dwl-9c7860886279977bf5d7a9792bae931ae5363a3f.tar.gz |
feat: xwayland display export, environment variables set in dwl
Diffstat (limited to 'dwl.c')
-rw-r--r-- | dwl.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -261,6 +261,11 @@ typedef struct { } Rule; typedef struct { + const char *variable; + const char *value; +} Env; + +typedef struct { struct wlr_scene_tree *scene; struct wlr_session_lock_v1 *lock; @@ -2580,6 +2585,8 @@ run(char *startup_cmd) if (!socket) die("startup: display_add_socket_auto"); setenv("WAYLAND_DISPLAY", socket, 1); + for (size_t i = 0; i < LENGTH(envs); i++) + setenv(envs[i].variable, envs[i].value, 1); /* Start the backend. This will enumerate outputs and inputs, become the DRM * master, etc */ @@ -2599,6 +2606,9 @@ run(char *startup_cmd) } } + /* Added display setup for xwayland-satellite */ + setenv("DISPLAY", ":0", 1); + drawbars(); /* At this point the outputs are initialized, choose initial selmon based on |