swaybar: deduplicate mode and workspace rendering code

The render_workspace_button and render_binding_mode_indicator functions are
almost the same. This commit extracts the common rendering code into a new
render_box function.
This commit is contained in:
Konstantin Pospelov 2025-03-27 20:11:59 +01:00 committed by Simon Ser
parent 63689bfb83
commit 7e7994dbb2
2 changed files with 73 additions and 101 deletions

View file

@ -14,6 +14,11 @@ struct box_colors {
uint32_t text;
};
struct box_size {
uint32_t width;
uint32_t height;
};
struct config_output {
struct wl_list link; // swaybar_config::outputs
char *name;