~zenomat/suckless-tools

6f8784f2ded736c5b0ea266ae83d0354a1cbd67c — TheOnAndOnlyZenomat 3 years ago ad672b5
added noborder patch
M dwm-anybar/config.h => dwm-anybar/config.h +1 -1
@@ 10,7 10,7 @@ static const unsigned int gappov    = 50;       /* vert outer gap between window
static const int smartgaps          = 1;        /* 1 means no outer gap when there is only one window */
static const int swallowfloating    = 0;        /* 1 means swallow floating windows by default */
static const int showbar            = 1;        /* 0 means no bar */
static const int topbar             = 1;        /* 0 means bottom bar */
static const int topbar             = 0;        /* 0 means bottom bar */
static const int usealtbar          = 1;        /* 1 means use non-dwm status bar */
static const char *altbarclass      = "Polybar"; /* Alternate bar class name */
static const char *alttrayname      = "tray";    /* Polybar tray instance name */

M dwm-anybar/dwm => dwm-anybar/dwm +0 -0
M dwm-anybar/dwm-msg => dwm-anybar/dwm-msg +0 -0
A dwm-anybar/dwm-noborderfloatingfix-6.2.diff => dwm-anybar/dwm-noborderfloatingfix-6.2.diff +31 -0
@@ 0,0 1,31 @@
From 700b0bdea872f4c00182b2bd925b41fe03f8d222 Mon Sep 17 00:00:00 2001
From: Aidan Hall <aidan.hall@outlook.com>
Date: Tue, 2 Jun 2020 14:41:53 +0000
Subject: [PATCH] Prevents hiding the border if layout is floating.

---
 dwm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dwm.c b/dwm.c
index 4465af1..2dd959d 100644
--- a/dwm.c
+++ b/dwm.c
@@ -1282,6 +1282,14 @@ resizeclient(Client *c, int x, int y, int w, int h)
 	c->oldw = c->w; c->w = wc.width = w;
 	c->oldh = c->h; c->h = wc.height = h;
 	wc.border_width = c->bw;
+	if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
+	    || &monocle == c->mon->lt[c->mon->sellt]->arrange)
+	    && !c->isfullscreen && !c->isfloating
+	    && NULL != c->mon->lt[c->mon->sellt]->arrange) {
+		c->w = wc.width += c->bw * 2;
+		c->h = wc.height += c->bw * 2;
+		wc.border_width = 0;
+	}
 	XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
 	configure(c);
 	XSync(dpy, False);
-- 
2.26.2


M dwm-anybar/dwm.c => dwm-anybar/dwm.c +8 -0
@@ 1588,6 1588,14 @@ resizeclient(Client *c, int x, int y, int w, int h)
	c->oldw = c->w; c->w = wc.width = w;
	c->oldh = c->h; c->h = wc.height = h;
	wc.border_width = c->bw;
	if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next))
	    || &monocle == c->mon->lt[c->mon->sellt]->arrange)
	    && !c->isfullscreen && !c->isfloating
	    && NULL != c->mon->lt[c->mon->sellt]->arrange) {
		c->w = wc.width += c->bw * 2;
		c->h = wc.height += c->bw * 2;
		wc.border_width = 0;
	}
	XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc);
	configure(c);
	XSync(dpy, False);

M dwm-anybar/dwm.c.orig => dwm-anybar/dwm.c.orig +13 -8
@@ 595,7 595,7 @@ unswallow(Client *c)
void
buttonpress(XEvent *e)
{
	unsigned int i, x, click;
	unsigned int i, x, click, occ = 0;
	Arg arg = {0};
	Client *c;
	Monitor *m;


@@ 610,9 610,14 @@ buttonpress(XEvent *e)
	}
	if (ev->window == selmon->barwin) {
		i = x = 0;
		do
		for (c = m->clients; c; c = c->next)
			occ |= c->tags == 255 ? 0 : c->tags;
		do {
			/* do not reserve space for vacant tags */
			if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
				continue;
			x += TEXTW(tags[i]);
		while (ev->x >= x && ++i < LENGTH(tags));
		} while (ev->x >= x && ++i < LENGTH(tags));
		if (i < LENGTH(tags)) {
			click = ClkTagBar;
			arg.ui = 1 << i;


@@ 914,19 919,19 @@ drawbar(Monitor *m)
	}

	for (c = m->clients; c; c = c->next) {
		occ |= c->tags;
		occ |= c->tags == 255 ? 0 : c->tags;
		if (c->isurgent)
			urg |= c->tags;
	}
	x = 0;
	for (i = 0; i < LENGTH(tags); i++) {
		/* do not draw vacant tags */
		if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
			continue;

		w = TEXTW(tags[i]);
		drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel : SchemeTagsNorm]);
		drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
		if (occ & 1 << i)
			drw_rect(drw, x + boxs, boxs, boxw, boxw,
				m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
				urg & 1 << i);
		x += w;
	}
	w = blw = TEXTW(m->ltsymbol);

M dwm-anybar/dwm.o => dwm-anybar/dwm.o +0 -0