Skip to content

Commit

Permalink
add scroll fields to query response (#520)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixKratz committed Mar 17, 2024
1 parent 3946005 commit 4194da0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bar_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,10 @@ void bar_item_serialize(struct bar_item* bar_item, FILE* rsp) {
"\t\t\"associated_display_mask\": %u,\n"
"\t\t\"ignore_association\": \"%s\",\n"
"\t\t\"y_offset\": %d,\n"
"\t\t\"width\": %d,\n"
"\t\t\"padding_left\": %d,\n"
"\t\t\"padding_right\": %d,\n"
"\t\t\"scroll_texts\": \"%s\",\n"
"\t\t\"width\": %d,\n"
"\t\t\"background\": {\n",
bar_item->name,
type,
Expand All @@ -896,6 +897,7 @@ void bar_item_serialize(struct bar_item* bar_item, FILE* rsp) {
bar_item->y_offset,
bar_item->background.padding_left,
bar_item->background.padding_right,
format_bool(bar_item->scroll_texts),
bar_item->has_const_width ? bar_item->custom_width : -1);

background_serialize(&bar_item->background, "\t\t\t", rsp, true);
Expand Down
2 changes: 2 additions & 0 deletions src/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ void text_serialize(struct text* text, char* indent, FILE* rsp) {
"%s\"y_offset\": %d,\n"
"%s\"font\": \"%s:%s:%.2f\",\n"
"%s\"width\": %d,\n"
"%s\"scroll_duration\": %d,\n"
"%s\"align\": \"%s\",\n"
"%s\"background\": {\n",
indent, text->string,
Expand All @@ -401,6 +402,7 @@ void text_serialize(struct text* text, char* indent, FILE* rsp) {
indent, text->y_offset,
indent, text->font.family, text->font.style, text->font.size,
indent, text->custom_width,
indent, text->scroll_duration,
indent, align, indent );

char deeper_indent[strlen(indent) + 2];
Expand Down

0 comments on commit 4194da0

Please sign in to comment.