Merge pull request #1578 from Airblader/feature-custom-separator

Add support for a custom separator symbol
This commit is contained in:
Michael Stapelberg
2015-03-25 22:49:09 +01:00
10 changed files with 81 additions and 12 deletions

View File

@ -421,6 +421,11 @@ CFGFUN(bar_font, const char *font) {
current_bar.font = sstrdup(font);
}
CFGFUN(bar_separator_symbol, const char *separator) {
FREE(current_bar.separator_symbol);
current_bar.separator_symbol = sstrdup(separator);
}
CFGFUN(bar_mode, const char *mode) {
current_bar.mode = (strcmp(mode, "dock") == 0 ? M_DOCK : (strcmp(mode, "hide") == 0 ? M_HIDE : M_INVISIBLE));
}

View File

@ -598,6 +598,11 @@ static void dump_bar_config(yajl_gen gen, Barconfig *config) {
YSTR_IF_SET(status_command);
YSTR_IF_SET(font);
if (config->separator_symbol) {
ystr("separator_symbol");
ystr(config->separator_symbol);
}
ystr("workspace_buttons");
y(bool, !config->hide_workspace_buttons);