~muirrum/dwm

026549ad570ead57a0a3a83b38dc0658361beaa4 — Cara Salter 2 years ago e5784d2 master
Add attachaside and gruvbox
2 files changed, 28 insertions(+), 11 deletions(-)

M config.h
M dwm.c
M config.h => config.h +1 -1
@@ 74,7 74,7 @@ static const Layout layouts[] = {
/* commands */
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
static const char *dmenucmd[]      = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gruvbox_dark_bg, "-nf", col_gruvbox_dark_fg, "-sb", col_gruvbox_dark_sel, "-sf", col_gray4, NULL };
static const char *termcmd[]       = { "alacritty", NULL };
static const char *termcmd[]       = { "st", NULL };
static const char *passcmd[]       = { "rofi-pass", NULL };
static const char *screenshotcmd[] = { "/home/csalter/bin/screenshot" };
static const char *lockcmd[]       = { "slock" };

M dwm.c => dwm.c +27 -10
@@ 1967,16 1967,33 @@ updategeom(void)
				updatebarpos(m);
			}

		/* removed monitors if n > nn */
		for (i = nn; i < n; i++) {
			for (m = mons; m && m->next; m = m->next);
			while ((c = m->clients)) {
				dirty = 1;
				m->clients = c->next;
				detachstack(c);
				c->mon = mons;
				attach(c);
				attachstack(c);
			for (i = 0, m = mons; i < nn && m; m = m->next, i++)
				if (i >= n
				|| unique[i].x_org != m->mx || unique[i].y_org != m->my
				|| unique[i].width != m->mw || unique[i].height != m->mh)
				{
					dirty = 1;
					m->num = i;
					m->mx = m->wx = unique[i].x_org;
					m->my = m->wy = unique[i].y_org;
					m->mw = m->ww = unique[i].width;
					m->mh = m->wh = unique[i].height;
					updatebarpos(m);
				}
		} else { /* less monitors available nn < n */
			for (i = nn; i < n; i++) {
				for (m = mons; m && m->next; m = m->next);
				while ((c = m->clients)) {
					dirty = 1;
					m->clients = c->next;
					detachstack(c);
					c->mon = mons;
					attachaside(c);
					attachstack(c);
				}
				if (m == selmon)
					selmon = mons;
				cleanupmon(m);
			}
			if (m == selmon)
				selmon = mons;