mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
add bar colours for focused_(workspace|statusline|separator)
If these aren't defined in config, color settings without 'focused_' prefix are used as a fallback.
This commit is contained in:
parent
39ee0ec552
commit
ad4d21d60b
9 changed files with 124 additions and 6 deletions
|
|
@ -312,6 +312,24 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) {
|
|||
json_object_object_add(colors, "statusline", json_object_new_string(bar->colors.statusline));
|
||||
json_object_object_add(colors, "separator", json_object_new_string(bar->colors.separator));
|
||||
|
||||
if (bar->colors.has_focused_background) {
|
||||
json_object_object_add(colors, "focused_background", json_object_new_string(bar->colors.focused_background));
|
||||
} else {
|
||||
json_object_object_add(colors, "focused_background", json_object_new_string(bar->colors.background));
|
||||
}
|
||||
|
||||
if (bar->colors.has_focused_statusline) {
|
||||
json_object_object_add(colors, "focused_statusline", json_object_new_string(bar->colors.focused_statusline));
|
||||
} else {
|
||||
json_object_object_add(colors, "focused_statusline", json_object_new_string(bar->colors.statusline));
|
||||
}
|
||||
|
||||
if (bar->colors.has_focused_separator) {
|
||||
json_object_object_add(colors, "focused_separator", json_object_new_string(bar->colors.focused_separator));
|
||||
} else {
|
||||
json_object_object_add(colors, "focused_separator", json_object_new_string(bar->colors.separator));
|
||||
}
|
||||
|
||||
json_object_object_add(colors, "focused_workspace_border", json_object_new_string(bar->colors.focused_workspace_border));
|
||||
json_object_object_add(colors, "focused_workspace_bg", json_object_new_string(bar->colors.focused_workspace_bg));
|
||||
json_object_object_add(colors, "focused_workspace_text", json_object_new_string(bar->colors.focused_workspace_text));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue