mirror of
https://github.com/swaywm/sway.git
synced 2024-11-29 11:21:28 +00:00
Added plaintext_markup to swaybar IPC
This commit is contained in:
parent
53b53dd8c2
commit
2e6c43e62b
|
@ -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, "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, "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, "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 *colors = json_object_new_object();
|
||||||
json_object_object_add(colors, "background", json_object_new_string(bar->colors.background));
|
json_object_object_add(colors, "background", json_object_new_string(bar->colors.background));
|
||||||
|
|
|
@ -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 *tray_output, *mode, *hidden_bar, *position, *status_command;
|
||||||
json_object *font, *bar_height, *workspace_buttons, *strip_workspace_numbers;
|
json_object *font, *bar_height, *workspace_buttons, *strip_workspace_numbers;
|
||||||
json_object *binding_mode_indicator, *verbose, *colors, *sep_symbol, *outputs;
|
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, "tray_output", &tray_output);
|
||||||
json_object_object_get_ex(bar_config, "mode", &mode);
|
json_object_object_get_ex(bar_config, "mode", &mode);
|
||||||
json_object_object_get_ex(bar_config, "hidden_bar", &hidden_bar);
|
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, "separator_symbol", &sep_symbol);
|
||||||
json_object_object_get_ex(bar_config, "colors", &colors);
|
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, "outputs", &outputs);
|
||||||
|
json_object_object_get_ex(bar_config, "plaintext_markup", &markup);
|
||||||
|
|
||||||
if (status_command) {
|
if (status_command) {
|
||||||
free(config->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);
|
config->height = json_object_get_int(bar_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (markup) {
|
||||||
|
config->plaintext_markup = json_object_get_boolean(markup);
|
||||||
|
}
|
||||||
|
|
||||||
// free previous outputs list
|
// free previous outputs list
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < config->outputs->length; ++i) {
|
for (i = 0; i < config->outputs->length; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue