diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2015-12-15 13:12:08 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2015-12-15 13:12:55 +0100 |
commit | 8c1d56812bea35b4543898ef3df82b2d35355be1 (patch) | |
tree | e56ebb3d5a9d36793f32d575af0648fc382ad81e /sway/config.c | |
parent | cfba09a4acff8fcb5944382a1161395eefe164ac (diff) |
Implement bar option: colors {}
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index 1fff3a08..a0e95677 100644 --- a/sway/config.c +++ b/sway/config.c @@ -263,6 +263,14 @@ bool read_config(FILE *file, bool is_active) { } break; + case CMD_BLOCK_BAR_COLORS: + if (block == CMD_BLOCK_BAR) { + block = CMD_BLOCK_BAR_COLORS; + } else { + sway_log(L_ERROR, "Invalid block '%s'", line); + } + break; + case CMD_BLOCK_END: switch(block) { case CMD_BLOCK_MODE: @@ -277,6 +285,11 @@ bool read_config(FILE *file, bool is_active) { block = CMD_BLOCK_END; break; + case CMD_BLOCK_BAR_COLORS: + sway_log(L_DEBUG, "End of bar colors block"); + block = CMD_BLOCK_BAR; + break; + case CMD_BLOCK_END: sway_log(L_ERROR, "Unmatched }"); break; @@ -554,6 +567,26 @@ struct bar_config *default_bar_config(void) { bar->strip_workspace_numbers = false; bar->binding_mode_indicator = true; bar->tray_padding = 2; + // set default colors + strcpy(bar->colors.background, "#000000"); + strcpy(bar->colors.statusline, "#ffffff"); + strcpy(bar->colors.separator, "#666666"); + strcpy(bar->colors.focused_workspace_border, "#4c7899"); + strcpy(bar->colors.focused_workspace_bg, "#285577"); + strcpy(bar->colors.focused_workspace_text, "#ffffff"); + strcpy(bar->colors.active_workspace_border, "333333"); + strcpy(bar->colors.active_workspace_bg, "#5f676a"); + strcpy(bar->colors.active_workspace_text, "#ffffff"); + strcpy(bar->colors.inactive_workspace_border, "#333333"); + strcpy(bar->colors.inactive_workspace_bg,"#222222"); + strcpy(bar->colors.inactive_workspace_text, "#888888"); + strcpy(bar->colors.urgent_workspace_border, "#2f343a"); + strcpy(bar->colors.urgent_workspace_bg,"#900000"); + strcpy(bar->colors.urgent_workspace_text, "#ffffff"); + strcpy(bar->colors.binding_mode_border, "#2f343a"); + strcpy(bar->colors.binding_mode_bg,"#900000"); + strcpy(bar->colors.binding_mode_text, "#ffffff"); + list_add(config->bars, bar); return bar; |