mirror of
https://github.com/swaywm/sway.git
synced 2026-05-01 06:46:25 -04:00
Implement empty workspaces in swaybar
This commit is contained in:
parent
d3ac856688
commit
173c918e43
10 changed files with 44 additions and 0 deletions
|
|
@ -73,6 +73,10 @@ struct swaybar_config *init_config(void) {
|
|||
config->colors.urgent_workspace.background = 0x900000FF;
|
||||
config->colors.urgent_workspace.text = 0xFFFFFFFF;
|
||||
|
||||
config->colors.empty_workspace.border = 0x000000FF;
|
||||
config->colors.empty_workspace.background = 0x000000FF;
|
||||
config->colors.empty_workspace.text = 0x666666FF;
|
||||
|
||||
config->colors.binding_mode.border = 0x2F343AFF;
|
||||
config->colors.binding_mode.background = 0x900000FF;
|
||||
config->colors.binding_mode.text = 0xFFFFFFFF;
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ static void ipc_parse_colors(
|
|||
{ "urgent_workspace_border", &config->colors.urgent_workspace.border },
|
||||
{ "urgent_workspace_bg", &config->colors.urgent_workspace.background },
|
||||
{ "urgent_workspace_text", &config->colors.urgent_workspace.text },
|
||||
{ "empty_workspace_border", &config->colors.empty_workspace.border },
|
||||
{ "empty_workspace_bg", &config->colors.empty_workspace.background },
|
||||
{ "empty_workspace_text", &config->colors.empty_workspace.text },
|
||||
{ "binding_mode_border", &config->colors.binding_mode.border },
|
||||
{ "binding_mode_bg", &config->colors.binding_mode.background },
|
||||
{ "binding_mode_text", &config->colors.binding_mode.text },
|
||||
|
|
|
|||
|
|
@ -623,6 +623,8 @@ static uint32_t render_workspace_button(struct render_context *ctx,
|
|||
box_colors = config->colors.focused_workspace;
|
||||
} else if (ws->visible) {
|
||||
box_colors = config->colors.active_workspace;
|
||||
} else if (ws->empty) {
|
||||
box_colors = config->colors.empty_workspace;
|
||||
} else {
|
||||
box_colors = config->colors.inactive_workspace;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue