This allows you to specify an alternate path to the i3bar binary.
The userguide docu is included.
}
---------------------------
+=== i3bar command
+
+By default i3 will just pass +i3bar+ and let your shell handle the execution,
+searching your +$PATH+ for a correct version.
+If you have a different +i3bar+ somewhere or the binary is not in your +$PATH+ you can
+tell i3 what to execute.
+
+The specified command will be passed to +sh -c+, so you can use globbing and
+have to have correct quoting etc.
+
+*Syntax*:
+----------------------
+i3bar_command command
+----------------------
+
+*Example*:
+-------------------------------------------------
+bar {
+ i3bar_command /home/user/bin/i3bar
+}
+-------------------------------------------------
+
=== Statusline command
i3bar can run a program and display every line of its +stdout+ output on the
/** Bar position (bottom by default). */
enum { P_BOTTOM = 0, P_TOP = 1 } position;
+ /** Command that should be run to execute i3bar, give a full path if i3bar is not
+ * in your $PATH.
+ * By default just 'i3bar' is executed. */
+ char *i3bar_command;
+
/** Command that should be run to get a statusline, for example 'i3status'.
* Will be passed to the shell. */
char *status_command;
<BAR_POSITION>bottom { yy_pop_state(); return TOK_BAR_BOTTOM; }
<BAR_POSITION>top { yy_pop_state(); return TOK_BAR_TOP; }
<BAR>status_command { WS_STRING; return TOK_BAR_STATUS_COMMAND; }
+<BAR>i3bar_command { WS_STRING; return TOK_BAR_I3BAR_COMMAND; }
<BAR>font { WS_STRING; return TOK_BAR_FONT; }
<BAR>workspace_buttons { return TOK_BAR_WORKSPACE_BUTTONS; }
<BAR>verbose { return TOK_BAR_VERBOSE; }
%token TOK_BAR_BOTTOM "bottom"
%token TOK_BAR_TOP "top"
%token TOK_BAR_STATUS_COMMAND "status_command"
+%token TOK_BAR_I3BAR_COMMAND "i3bar_command"
%token TOK_BAR_FONT "font (bar)"
%token TOK_BAR_WORKSPACE_BUTTONS "workspace_buttons"
%token TOK_BAR_VERBOSE "verbose"
barline:
comment
| bar_status_command
+ | bar_i3bar_command
| bar_output
| bar_tray_output
| bar_position
}
;
+bar_i3bar_command:
+ TOK_BAR_I3BAR_COMMAND STR
+ {
+ DLOG("should add i3bar_command %s\n", $2);
+ FREE(current_bar.i3bar_command);
+ current_bar.i3bar_command = $2;
+ }
+ ;
+
bar_output:
TOK_BAR_OUTPUT STR
{
FREE(barconfig->tray_output);
FREE(barconfig->socket_path);
FREE(barconfig->status_command);
+ FREE(barconfig->i3bar_command);
FREE(barconfig->font);
FREE(barconfig->colors.background);
FREE(barconfig->colors.statusline);
Barconfig *barconfig;
TAILQ_FOREACH(barconfig, &barconfigs, configs) {
char *command = NULL;
- sasprintf(&command, "i3bar --bar_id=%s --socket=\"%s\"",
- barconfig->id, current_socketpath);
+ sasprintf(&command, "%s --bar_id=%s --socket=\"%s\"",
+ barconfig->i3bar_command ? barconfig->i3bar_command : "i3bar",
+ barconfig->id, current_socketpath);
LOG("Starting bar process: %s\n", command);
start_application(command, true);
free(command);