char *urgent_ws_bg;
char *urgent_ws_fg;
char *urgent_ws_border;
+ char *binding_mode_bg;
+ char *binding_mode_fg;
+ char *binding_mode_border;
};
typedef struct xcb_colors_t xcb_colors_t;
COLOR(urgent_workspace_border, urgent_ws_border);
COLOR(urgent_workspace_bg, urgent_ws_bg);
COLOR(urgent_workspace_text, urgent_ws_fg);
+ COLOR(binding_mode_border, binding_mode_border);
+ COLOR(binding_mode_bg, binding_mode_bg);
+ COLOR(binding_mode_text, binding_mode_fg);
printf("got unexpected string %.*s for cur_key = %s\n", len, val, cur_key);
FREE_COLOR(focus_ws_fg);
FREE_COLOR(focus_ws_bg);
FREE_COLOR(focus_ws_border);
+ FREE_COLOR(binding_mode_fg);
+ FREE_COLOR(binding_mode_bg);
+ FREE_COLOR(binding_mode_border);
#undef FREE_COLOR
}
uint32_t focus_ws_bg;
uint32_t focus_ws_fg;
uint32_t focus_ws_border;
+ uint32_t binding_mode_bg;
+ uint32_t binding_mode_fg;
+ uint32_t binding_mode_border;
};
struct xcb_colors_t colors;
PARSE_COLOR(focus_ws_border, "#4c7899");
#undef PARSE_COLOR
+#define PARSE_COLOR_FALLBACK(name, fallback) \
+ do { \
+ colors.name = new_colors->name ? get_colorpixel(new_colors->name) : colors.fallback; \
+ } while (0)
+
+ /* For the binding mode indicator colors, we don't hardcode a default.
+ * Instead, we fall back to urgent_ws_* colors. */
+ PARSE_COLOR_FALLBACK(binding_mode_fg, urgent_ws_fg);
+ PARSE_COLOR_FALLBACK(binding_mode_bg, urgent_ws_bg);
+ PARSE_COLOR_FALLBACK(binding_mode_border, urgent_ws_border);
+#undef PARSE_COLOR_FALLBACK
+
init_tray_colors();
xcb_flush(xcb_connection);
}
char *urgent_workspace_border;
char *urgent_workspace_bg;
char *urgent_workspace_text;
+
+ char *binding_mode_border;
+ char *binding_mode_bg;
+ char *binding_mode_text;
} colors;
TAILQ_ENTRY(Barconfig) configs;
'set' -> BAR_COLORS_IGNORE_LINE
colorclass = 'background', 'statusline', 'separator'
-> BAR_COLORS_SINGLE
- colorclass = 'focused_workspace', 'active_workspace', 'inactive_workspace', 'urgent_workspace'
+ colorclass = 'focused_workspace', 'active_workspace', 'inactive_workspace', 'urgent_workspace', 'binding_mode'
-> BAR_COLORS_BORDER
'}'
-> BAR
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);
}
APPLY_COLORS(active_workspace);
APPLY_COLORS(inactive_workspace);
APPLY_COLORS(urgent_workspace);
+ APPLY_COLORS(binding_mode);
#undef APPLY_COLORS
}
YSTR_IF_SET(urgent_workspace_border);
YSTR_IF_SET(urgent_workspace_bg);
YSTR_IF_SET(urgent_workspace_text);
+ YSTR_IF_SET(binding_mode_border);
+ YSTR_IF_SET(binding_mode_bg);
+ YSTR_IF_SET(binding_mode_text);
y(map_close);
y(map_close);
active_workspace #333333 #222222 #888888
inactive_workspace #333333 #222222 #888888
urgent_workspace #2f343a #900000 #ffffff
+ binding_mode #abc123 #123abc #ababab
}
}
EOT
urgent_workspace_border => '#2f343a',
urgent_workspace_text => '#ffffff',
urgent_workspace_bg => '#900000',
+ binding_mode_border => '#abc123',
+ binding_mode_text => '#ababab',
+ binding_mode_bg => '#123abc',
}, 'colors ok');
exit_gracefully($pid);