summaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar Mykyta Holubakha <hilobakho@gmail.com>2016-04-24 20:11:23 +0300
committerLibravatar Mykyta Holubakha <hilobakho@gmail.com>2016-04-24 20:14:02 +0300
commit2e6c43e62b9b34c0ce019c013d3f6e4863a9d482 (patch)
tree944933ffedcf744a5e2852bef9d04ad50521dc44 /swaybar
parentAdded plaintext markup configuration (diff)
downloadsway-2e6c43e62b9b34c0ce019c013d3f6e4863a9d482.tar.gz
sway-2e6c43e62b9b34c0ce019c013d3f6e4863a9d482.tar.zst
sway-2e6c43e62b9b34c0ce019c013d3f6e4863a9d482.zip
Added plaintext_markup to swaybar IPC
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/ipc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index 312c79b9..0446f38a 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -12,6 +12,7 @@ static void ipc_parse_config(struct config *config, const char *payload) {
12 json_object *tray_output, *mode, *hidden_bar, *position, *status_command; 12 json_object *tray_output, *mode, *hidden_bar, *position, *status_command;
13 json_object *font, *bar_height, *workspace_buttons, *strip_workspace_numbers; 13 json_object *font, *bar_height, *workspace_buttons, *strip_workspace_numbers;
14 json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol, *outputs; 14 json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol, *outputs;
15 json_object *markup;
15 json_object_object_get_ex(bar_config, "tray_output", &tray_output); 16 json_object_object_get_ex(bar_config, "tray_output", &tray_output);
16 json_object_object_get_ex(bar_config, "mode", &mode); 17 json_object_object_get_ex(bar_config, "mode", &mode);
17 json_object_object_get_ex(bar_config, "hidden_bar", &hidden_bar); 18 json_object_object_get_ex(bar_config, "hidden_bar", &hidden_bar);
@@ -26,6 +27,7 @@ static void ipc_parse_config(struct config *config, const char *payload) {
26 json_object_object_get_ex(bar_config, "separator_symbol", &sep_symbol); 27 json_object_object_get_ex(bar_config, "separator_symbol", &sep_symbol);
27 json_object_object_get_ex(bar_config, "colors", &colors); 28 json_object_object_get_ex(bar_config, "colors", &colors);
28 json_object_object_get_ex(bar_config, "outputs", &outputs); 29 json_object_object_get_ex(bar_config, "outputs", &outputs);
30 json_object_object_get_ex(bar_config, "plaintext_markup", &markup);
29 31
30 if (status_command) { 32 if (status_command) {
31 free(config->status_command); 33 free(config->status_command);
@@ -62,6 +64,10 @@ static void ipc_parse_config(struct config *config, const char *payload) {
62 config->height = json_object_get_int(bar_height); 64 config->height = json_object_get_int(bar_height);
63 } 65 }
64 66
67 if (markup) {
68 config->plaintext_markup = json_object_get_boolean(markup);
69 }
70
65 // free previous outputs list 71 // free previous outputs list
66 int i; 72 int i;
67 for (i = 0; i < config->outputs->length; ++i) { 73 for (i = 0; i < config->outputs->length; ++i) {