From 230b238870c742eb4c55de62c04d022bb6c12682 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 20 Oct 2011 19:03:40 +0100 Subject: [PATCH] Actually start i3bar instances for each configured bar --- src/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main.c b/src/main.c index 832d7f1b..50ebaa34 100644 --- a/src/main.c +++ b/src/main.c @@ -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);