Separator color via config; separator width and on/off via ipc

This patch adds the following features:
1) Configure a color of the separator via config.  It is done like
   bar {
      colors {
         separator #000000
      }
   }
2) A block can have an integer entry "separator_block_width" which
   sets the width of the gap which would follow after the current block.

3) A block can have a boolean entry "separator" and if it is set
   to false, then the drawing of the separating line would be disabled.
This commit is contained in:
Artem Shinkarov
2013-01-27 20:27:21 +00:00
committed by Michael Stapelberg
parent a52b1b4bb0
commit 5f05ca6b5d
12 changed files with 47 additions and 6 deletions

View File

@ -526,7 +526,10 @@ CFGFUN(bar_tray_output, const char *output) {
CFGFUN(bar_color_single, const char *colorclass, const char *color) {
if (strcmp(colorclass, "background") == 0)
current_bar.colors.background = sstrdup(color);
else current_bar.colors.statusline = sstrdup(color);
else if (strcmp(colorclass, "separator") == 0)
current_bar.colors.separator = sstrdup(color);
else
current_bar.colors.statusline = sstrdup(color);
}
CFGFUN(bar_status_command, const char *command) {

View File

@ -677,6 +677,7 @@ IPC_HANDLER(get_bar_config) {
y(map_open);
YSTR_IF_SET(background);
YSTR_IF_SET(statusline);
YSTR_IF_SET(separator);
YSTR_IF_SET(focused_workspace_border);
YSTR_IF_SET(focused_workspace_bg);
YSTR_IF_SET(focused_workspace_text);