aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2016-04-24 20:11:23 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2016-04-24 20:14:02 +0300
commit2e6c43e62b9b34c0ce019c013d3f6e4863a9d482 (patch)
tree944933ffedcf744a5e2852bef9d04ad50521dc44
parent53b53dd8c24004d9b2a2170590432d62656c43c2 (diff)
downloadsway-2e6c43e62b9b34c0ce019c013d3f6e4863a9d482.tar.xz
Added plaintext_markup to swaybar IPC
-rw-r--r--sway/ipc-server.c1
-rw-r--r--swaybar/ipc.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index f6116921..0ab6af49 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -600,6 +600,7 @@ json_object *ipc_json_describe_bar_config(struct bar_config *bar) {
json_object_object_add(json, "strip_workspace_numbers", json_object_new_boolean(bar->strip_workspace_numbers));
json_object_object_add(json, "binding_mode_indicator", json_object_new_boolean(bar->binding_mode_indicator));
json_object_object_add(json, "verbose", json_object_new_boolean(bar->verbose));
+ json_object_object_add(json, "plaintext_markup", json_object_new_boolean(bar->plaintext_markup));
json_object *colors = json_object_new_object();
json_object_object_add(colors, "background", json_object_new_string(bar->colors.background));
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) {
json_object *tray_output, *mode, *hidden_bar, *position, *status_command;
json_object *font, *bar_height, *workspace_buttons, *strip_workspace_numbers;
json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol, *outputs;
+ json_object *markup;
json_object_object_get_ex(bar_config, "tray_output", &tray_output);
json_object_object_get_ex(bar_config, "mode", &mode);
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) {
json_object_object_get_ex(bar_config, "separator_symbol", &sep_symbol);
json_object_object_get_ex(bar_config, "colors", &colors);
json_object_object_get_ex(bar_config, "outputs", &outputs);
+ json_object_object_get_ex(bar_config, "plaintext_markup", &markup);
if (status_command) {
free(config->status_command);
@@ -62,6 +64,10 @@ static void ipc_parse_config(struct config *config, const char *payload) {
config->height = json_object_get_int(bar_height);
}
+ if (markup) {
+ config->plaintext_markup = json_object_get_boolean(markup);
+ }
+
// free previous outputs list
int i;
for (i = 0; i < config->outputs->length; ++i) {