]> git.sur5r.net Git - i3/i3/blobdiff - i3-input/main.c
Use I3SOCK-environment-variable
[i3/i3] / i3-input / main.c
index 6c2b35a193f76149a5c1645a38815fae923889e0..b9b4ba81bd74ce75e4655b55b978a5a1543eb057 100644 (file)
@@ -241,7 +241,10 @@ static int handle_key_press(void *ignored, xcb_connection_t *conn, xcb_key_press
 }
 
 int main(int argc, char *argv[]) {
-        char *socket_path = "/tmp/i3-ipc.sock";
+        char *socket_path;
+        if ((socket_path = getenv("I3SOCK")) == NULL) {
+                socket_path = "/tmp/i3-ipc.sock";
+        }
         char *pattern = "-misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1";
         int o, option_index = 0;