]> git.sur5r.net Git - i3/i3/blobdiff - i3-config-wizard/main.c
no-op refactoring: make ipc_connect find socket path
[i3/i3] / i3-config-wizard / main.c
index dd58fd124547df7dcee0ce40785784eb1e43be4d..97c2a602faca08bc28ebc3bd9e5efa022f4ed049 100644 (file)
@@ -94,7 +94,7 @@ static xcb_get_modifier_mapping_reply_t *modmap_reply;
 static i3Font font;
 static i3Font bold_font;
 static int char_width;
-static char *socket_path;
+static char *socket_path = NULL;
 static xcb_window_t win;
 static surface_t surface;
 static xcb_key_symbols_t *symbols;
@@ -744,7 +744,6 @@ static void finish() {
 
 int main(int argc, char *argv[]) {
     char *xdg_config_home;
-    socket_path = getenv("I3SOCK");
     char *pattern = "pango:monospace 8";
     char *patternbold = "pango:monospace bold 8";
     int o, option_index = 0;
@@ -824,12 +823,6 @@ int main(int argc, char *argv[]) {
                                     &xkb_base_error) != 1)
         errx(EXIT_FAILURE, "Could not setup XKB extension.");
 
-    if (socket_path == NULL)
-        socket_path = root_atom_contents("I3_SOCKET_PATH", conn, screen);
-
-    if (socket_path == NULL)
-        socket_path = "/tmp/i3-ipc.sock";
-
     keysyms = xcb_key_symbols_alloc(conn);
     xcb_get_modifier_mapping_cookie_t modmap_cookie;
     modmap_cookie = xcb_get_modifier_mapping(conn);