- /* Clear bar configs */
- Barconfig *barconfig;
- while (!TAILQ_EMPTY(&barconfigs)) {
- barconfig = TAILQ_FIRST(&barconfigs);
- FREE(barconfig->id);
- for (int c = 0; c < barconfig->num_outputs; c++)
- free(barconfig->outputs[c]);
-
- while (!TAILQ_EMPTY(&(barconfig->bar_bindings))) {
- struct Barbinding *binding = TAILQ_FIRST(&(barconfig->bar_bindings));
- FREE(binding->command);
- TAILQ_REMOVE(&(barconfig->bar_bindings), binding, bindings);
- FREE(binding);
- }
-
- 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->socket_path);
- FREE(barconfig->status_command);
- FREE(barconfig->i3bar_command);
- FREE(barconfig->font);
- FREE(barconfig->colors.background);
- FREE(barconfig->colors.statusline);
- FREE(barconfig->colors.separator);
- FREE(barconfig->colors.focused_background);
- FREE(barconfig->colors.focused_statusline);
- FREE(barconfig->colors.focused_separator);
- FREE(barconfig->colors.focused_workspace_border);
- FREE(barconfig->colors.focused_workspace_bg);
- FREE(barconfig->colors.focused_workspace_text);
- FREE(barconfig->colors.active_workspace_border);
- FREE(barconfig->colors.active_workspace_bg);
- FREE(barconfig->colors.active_workspace_text);
- FREE(barconfig->colors.inactive_workspace_border);
- FREE(barconfig->colors.inactive_workspace_bg);
- FREE(barconfig->colors.inactive_workspace_text);
- FREE(barconfig->colors.urgent_workspace_border);
- FREE(barconfig->colors.urgent_workspace_bg);
- FREE(barconfig->colors.urgent_workspace_text);
- FREE(barconfig->colors.binding_mode_border);
- FREE(barconfig->colors.binding_mode_bg);
- FREE(barconfig->colors.binding_mode_text);
- TAILQ_REMOVE(&barconfigs, barconfig, configs);
- FREE(barconfig);