mirror of
https://github.com/swaywm/sway.git
synced 2025-10-29 05:40:18 -04:00
Added plaintext_markup to swaybar IPC
This commit is contained in:
parent
53b53dd8c2
commit
2e6c43e62b
2 changed files with 7 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue