aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2016-10-27 10:37:16 -0400
committerDrew DeVault <sir@cmpwn.com>2016-10-27 10:37:16 -0400
commit0d6cbcacbe864cab2a4c74343e8af2b80e535bd6 (patch)
treeeb86d707db2b545bff76482279de7df41f207483
parentde074b9347b21ae0cd27afa5dfafac92707cf0d1 (diff)
Log important env vars on startup
-rw-r--r--sway/main.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c
index b924a9ab..015fe247 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -75,6 +75,32 @@ void run_as_ipc_client(char *command, char *socket_path) {
close(socketfd);
}
+static void log_env() {
+ const char *log_vars[] = {
+ "PATH",
+ "LD_LOAD_PATH",
+ "LD_PRELOAD_PATH",
+ "SWAY_CURSOR_THEME",
+ "SWAY_CURSOR_SIZE",
+ "SWAYSOCK",
+ "WLC_DRM_DEVICE",
+ "WLC_SHM",
+ "WLC_OUTPUTS",
+ "WLC_XWAYLAND",
+ "WLC_LIBINPUT",
+ "WLC_REPEAT_DELAY",
+ "WLC_REPEAT_RATE",
+ "XKB_DEFAULT_RULES",
+ "XKB_DEFAULT_MODEL",
+ "XKB_DEFAULT_LAYOUT",
+ "XKB_DEFAULT_VARIANT",
+ "XKB_DEFAULT_OPTIONS",
+ };
+ for (size_t i = 0; i < sizeof(log_vars) / sizeof(char *); ++i) {
+ sway_log(L_INFO, "%s=%s", log_vars[i], getenv(log_vars[i]));
+ }
+}
+
int main(int argc, char **argv) {
static int verbose = 0, debug = 0, validate = 0;
@@ -210,6 +236,7 @@ int main(int argc, char **argv) {
#if defined SWAY_GIT_VERSION && defined SWAY_GIT_BRANCH && defined SWAY_VERSION_DATE
sway_log(L_INFO, "Starting sway version %s (%s, branch \"%s\")\n", SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH);
#endif
+ log_env();
init_layout();