commit a7578789d6bbbee09ac635ca4077e80005ca4f7c
parent 19e07b6ae098b8ed509d6a00bdd7b8799e3cdc6e
Author: hhvn <dev@hhvn.uk>
Date: Sun, 9 Jan 2022 19:35:46 +0000
tabbed.c config.h: draw tab seperator
Diffstat:
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/config.h b/config.h
@@ -12,6 +12,7 @@ static const char before[] = "<";
static const char after[] = ">";
static const char titletrim[] = "...";
static const int tabwidth = 200;
+static const int sepwidth = 1;
static const Bool foreground = True;
static Bool urgentswitch = False;
static Bool focusnew = True; /* focus on a newly embedded window */
diff --git a/tabbed.c b/tabbed.c
@@ -385,6 +385,14 @@ drawbar(void)
drawtext(tabtitle, col);
dc.x += dc.w;
clients[c]->tabx = dc.x;
+ if (c + 1 < fc + cc && sepwidth) {
+ XSetForeground(dpy, dc.gc, dc.sel[ColBG].pixel);
+ XFillRectangle(dpy, dc.drawable, dc.gc, dc.x - sepwidth, 0, sepwidth, dc.h);
+ }
+ }
+ if (sepwidth) {
+ XSetForeground(dpy, dc.gc, dc.sel[ColBG].pixel);
+ XFillRectangle(dpy, dc.drawable, dc.gc, 0, dc.h - sepwidth, ww, sepwidth);
}
XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, bh, 0, 0);
XSync(dpy, False);