aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
authorLibravatar D.B <thejan.2009@gmail.com>2016-11-02 21:07:04 +0100
committerLibravatar D.B <thejan.2009@gmail.com>2016-11-02 21:07:04 +0100
commit58eb7ac19fe436737babcbd1effd41ef96af6632 (patch)
treea3db9567c63b2b2bae27c17d3a103c8f2786a9f7 /sway/ipc-json.c
parentadd bar colours for focused_(workspace|statusline|separator) (diff)
downloadsway-58eb7ac19fe436737babcbd1effd41ef96af6632.tar.gz
sway-58eb7ac19fe436737babcbd1effd41ef96af6632.tar.zst
sway-58eb7ac19fe436737babcbd1effd41ef96af6632.zip
change bar colors from char[10] to *char
This commit removes has_* booleans from bar color struct. It also generalizes of functions in commands/bar/colors.c.
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r--sway/ipc-json.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index c21d28af..e65e9de3 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -312,19 +312,19 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) {
312 json_object_object_add(colors, "statusline", json_object_new_string(bar->colors.statusline)); 312 json_object_object_add(colors, "statusline", json_object_new_string(bar->colors.statusline));
313 json_object_object_add(colors, "separator", json_object_new_string(bar->colors.separator)); 313 json_object_object_add(colors, "separator", json_object_new_string(bar->colors.separator));
314 314
315 if (bar->colors.has_focused_background) { 315 if (bar->colors.focused_background) {
316 json_object_object_add(colors, "focused_background", json_object_new_string(bar->colors.focused_background)); 316 json_object_object_add(colors, "focused_background", json_object_new_string(bar->colors.focused_background));
317 } else { 317 } else {
318 json_object_object_add(colors, "focused_background", json_object_new_string(bar->colors.background)); 318 json_object_object_add(colors, "focused_background", json_object_new_string(bar->colors.background));
319 } 319 }
320 320
321 if (bar->colors.has_focused_statusline) { 321 if (bar->colors.focused_statusline) {
322 json_object_object_add(colors, "focused_statusline", json_object_new_string(bar->colors.focused_statusline)); 322 json_object_object_add(colors, "focused_statusline", json_object_new_string(bar->colors.focused_statusline));
323 } else { 323 } else {
324 json_object_object_add(colors, "focused_statusline", json_object_new_string(bar->colors.statusline)); 324 json_object_object_add(colors, "focused_statusline", json_object_new_string(bar->colors.statusline));
325 } 325 }
326 326
327 if (bar->colors.has_focused_separator) { 327 if (bar->colors.focused_separator) {
328 json_object_object_add(colors, "focused_separator", json_object_new_string(bar->colors.focused_separator)); 328 json_object_object_add(colors, "focused_separator", json_object_new_string(bar->colors.focused_separator));
329 } else { 329 } else {
330 json_object_object_add(colors, "focused_separator", json_object_new_string(bar->colors.separator)); 330 json_object_object_add(colors, "focused_separator", json_object_new_string(bar->colors.separator));
@@ -346,19 +346,19 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) {
346 json_object_object_add(colors, "urgent_workspace_bg", json_object_new_string(bar->colors.urgent_workspace_bg)); 346 json_object_object_add(colors, "urgent_workspace_bg", json_object_new_string(bar->colors.urgent_workspace_bg));
347 json_object_object_add(colors, "urgent_workspace_text", json_object_new_string(bar->colors.urgent_workspace_text)); 347 json_object_object_add(colors, "urgent_workspace_text", json_object_new_string(bar->colors.urgent_workspace_text));
348 348
349 if (bar->colors.has_binding_mode_border) { 349 if (bar->colors.binding_mode_border) {
350 json_object_object_add(colors, "binding_mode_border", json_object_new_string(bar->colors.binding_mode_border)); 350 json_object_object_add(colors, "binding_mode_border", json_object_new_string(bar->colors.binding_mode_border));
351 } else { 351 } else {
352 json_object_object_add(colors, "binding_mode_border", json_object_new_string(bar->colors.urgent_workspace_border)); 352 json_object_object_add(colors, "binding_mode_border", json_object_new_string(bar->colors.urgent_workspace_border));
353 } 353 }
354 354
355 if (bar->colors.has_binding_mode_bg) { 355 if (bar->colors.binding_mode_bg) {
356 json_object_object_add(colors, "binding_mode_bg", json_object_new_string(bar->colors.binding_mode_bg)); 356 json_object_object_add(colors, "binding_mode_bg", json_object_new_string(bar->colors.binding_mode_bg));
357 } else { 357 } else {
358 json_object_object_add(colors, "binding_mode_bg", json_object_new_string(bar->colors.urgent_workspace_bg)); 358 json_object_object_add(colors, "binding_mode_bg", json_object_new_string(bar->colors.urgent_workspace_bg));
359 } 359 }
360 360
361 if (bar->colors.has_binding_mode_text) { 361 if (bar->colors.binding_mode_text) {
362 json_object_object_add(colors, "binding_mode_text", json_object_new_string(bar->colors.binding_mode_text)); 362 json_object_object_add(colors, "binding_mode_text", json_object_new_string(bar->colors.binding_mode_text));
363 } else { 363 } else {
364 json_object_object_add(colors, "binding_mode_text", json_object_new_string(bar->colors.urgent_workspace_text)); 364 json_object_object_add(colors, "binding_mode_text", json_object_new_string(bar->colors.urgent_workspace_text));