]> git.sur5r.net Git - i3/i3/commitdiff
Actually start i3bar instances for each configured bar
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 20 Oct 2011 18:03:40 +0000 (19:03 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 20 Oct 2011 18:03:40 +0000 (19:03 +0100)
src/main.c

index 832d7f1b14904c4b15f39325ab9c178e6712262a..50ebaa349c4708a5cefb2703d04eeae083daa800 100644 (file)
@@ -633,6 +633,17 @@ int main(int argc, char *argv[]) {
         start_application(exec_always->command);
     }
 
+    /* Start i3bar processes for all configured bars */
+    Barconfig *barconfig;
+    TAILQ_FOREACH(barconfig, &barconfigs, configs) {
+        char *command = NULL;
+        asprintf(&command, "i3bar --bar_id=%s --socket=\"%s\"",
+                 barconfig->id, current_socketpath);
+        LOG("Starting bar process: %s\n", command);
+        start_application(command);
+        free(command);
+    }
+
     /* Make sure to destroy the event loop to invoke the cleeanup callbacks
      * when calling exit() */
     atexit(i3_exit);