Allow multiple tray_output directives.
This patch introduces the possibility to specify the tray_output directive multiple times. All values will be used by i3bar, in the order they are given. This way, a single bar configuration can be used for several machines with internal output names "eDP1" and "LVDS-0" by specifying tray_output for both. Any external output (e.g., "DP-0") will still not receive the tray. The same effect can be achieved by using "primary", but forces the user to couple the tray display to the primary output which may not be desirable behavior. relates to #555
This commit is contained in:
@ -110,8 +110,13 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
|
||||
FREE(barconfig->id);
|
||||
for (int c = 0; c < barconfig->num_outputs; c++)
|
||||
free(barconfig->outputs[c]);
|
||||
while (!TAILQ_EMPTY(&(barconfig->tray_outputs))) {
|
||||
struct tray_output_t *tray_output = TAILQ_FIRST(&(barconfig->tray_outputs));
|
||||
FREE(tray_output->output);
|
||||
TAILQ_REMOVE(&(barconfig->tray_outputs), tray_output, tray_outputs);
|
||||
FREE(tray_output);
|
||||
}
|
||||
FREE(barconfig->outputs);
|
||||
FREE(barconfig->tray_output);
|
||||
FREE(barconfig->socket_path);
|
||||
FREE(barconfig->status_command);
|
||||
FREE(barconfig->i3bar_command);
|
||||
|
Reference in New Issue
Block a user