]> git.sur5r.net Git - i3/i3/blobdiff - i3bar/src/main.c
ipc: rename COMMAND to RUN_COMMAND for consistency (#2956)
[i3/i3] / i3bar / src / main.c
index 3b5d75460d1f54862191cff8282be2343cf00b94..910e952482f0d788b46747ac0b9bab396242f7c5 100644 (file)
@@ -5,6 +5,8 @@
  * © 2010 Axel Wagner and contributors (see also: LICENSE)
  *
  */
+#include "common.h"
+
 #include <stdio.h>
 #include <i3/ipc.h>
 #include <string.h>
@@ -15,8 +17,6 @@
 #include <getopt.h>
 #include <glob.h>
 
-#include "common.h"
-
 /*
  * Having verboselog(), errorlog() and debuglog() is necessary when using libi3.
  *
@@ -93,6 +93,9 @@ int main(int argc, char **argv) {
     int opt;
     int option_index = 0;
     char *socket_path = getenv("I3SOCK");
+    if (socket_path != NULL) {
+        socket_path = sstrdup(socket_path);
+    }
     char *i3_default_sock_path = "/tmp/i3-ipc.sock";
 
     /* Initialize the standard config to use 0 as default */
@@ -146,6 +149,8 @@ int main(int argc, char **argv) {
         socket_path = expand_path(i3_default_sock_path);
     }
 
+    init_dpi();
+
     init_outputs();
     if (init_connection(socket_path)) {
         /* Request the bar configuration. When it arrives, we fill the config array. */