diff options
| author | kolunmi <kolunmi@tutanota.com> | 2023-02-24 16:45:05 -0700 |
|---|---|---|
| committer | kolunmi <kolunmi@tutanota.com> | 2023-02-24 16:45:05 -0700 |
| commit | af679ed301b5dcdbd94b66f49804b1b7a7aae3e5 (patch) | |
| tree | deebb29dc39b70b3c6f2a1bfe708d6a74796f4f4 | |
| parent | 043316cdd741e28f77e87d56e5df036c4391336f (diff) | |
| download | dwlb-af679ed301b5dcdbd94b66f49804b1b7a7aae3e5.tar.gz | |
draw empty rectangles on inactive occupied tags
| -rw-r--r-- | dwlb.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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); |