dwlb

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit af679ed301b5dcdbd94b66f49804b1b7a7aae3e5
parent 043316cdd741e28f77e87d56e5df036c4391336f
Author: kolunmi <kolunmi@tutanota.com>
Date:   Fri, 24 Feb 2023 16:45:05 -0700

draw empty rectangles on inactive occupied tags

Diffstat:
Mdwlb.c | 12+++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dwlb.c b/dwlb.c @@ -407,12 +407,22 @@ draw_frame(Bar *bar) pixman_color_t *fg_color = urgent ? &urgent_fg_color : (active ? &active_fg_color : &inactive_fg_color); pixman_color_t *bg_color = urgent ? &urgent_bg_color : (active ? &active_bg_color : &inactive_bg_color); - if (!hide_vacant && occupied) + if (!hide_vacant && occupied) { pixman_image_fill_boxes(PIXMAN_OP_SRC, foreground, fg_color, 1, &(pixman_box32_t){ .x1 = x + boxs, .x2 = x + boxs + boxw, .y1 = boxs, .y2 = boxs + boxw }); + if ((!bar->selmon || !active) && boxw >= 3) { + /* Make box hollow */ + pixman_image_fill_boxes(PIXMAN_OP_SRC, foreground, + &(pixman_color_t){ 0 }, + 1, &(pixman_box32_t){ + .x1 = x + boxs + 1, .x2 = x + boxs + boxw - 1, + .y1 = boxs + 1, .y2 = boxs + boxw - 1 + }); + } + } x = draw_text(tags[i], x, y, foreground, background, fg_color, bg_color, bar->width, bar->height, bar->textpadding, NULL, 0);