From 3bc0753f3915f5d28e89d3f9359a69552f02a6a7 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Thu, 27 Mar 2025 20:11:59 +0100 Subject: 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. --- include/swaybar/config.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/swaybar/config.h b/include/swaybar/config.h index 361acd99..ad58b3c3 100644 --- a/include/swaybar/config.h +++ b/include/swaybar/config.h @@ -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; -- cgit v1.2.3