aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2025-05-11 10:39:29 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2025-05-11 10:39:29 +0530
commitfe2aa5620eeeabe70af66c4a3fbe209f84c8fdbc (patch)
tree55663a7a3c0737d34403fcca3a64c46dacf8c08a
parentee458a26fe47c1dd7b800b2c30af497437b69e6f (diff)
removed patch dwm-gaplessgrid-20160731-56a31dc.diff
-rw-r--r--config.def.h15
-rw-r--r--gaplessgrid.c35
-rw-r--r--patches/dwm-gaplessgrid-20160731-56a31dc.diff43
3 files changed, 3 insertions, 90 deletions
diff --git a/config.def.h b/config.def.h
index 1a74307..604be99 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,15 +1,8 @@
-#include "gaplessgrid.c"
-
static const unsigned int borderpx = 2;
static const unsigned int snap = 32;
static const int showbar = 1;
static const int topbar = 1;
-
-// disabled because it messes up clickable areas
-// TODO: gotta fix
-// static const char *barlayout = "sn|lt";
-static const char *barlayout = "";
-
+static const char *barlayout = "sn|lt";
static const int user_bh = 30;
static const char *fonts[] = { "Noto Sans CJK JP:size=14" };
static const unsigned int gappx = 8;
@@ -41,7 +34,6 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
- { "###", gaplessgrid }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
};
@@ -97,9 +89,8 @@ static const Key keys[] = {
/* layouts */
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
- { MODKEY|ShiftMask, XK_g, setlayout, {.v = &layouts[1]} },
- { MODKEY, XK_f, setlayout, {.v = &layouts[2]} },
- { MODKEY, XK_m, setlayout, {.v = &layouts[3]} },
+ { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
+ { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_space, setlayout, {0} },
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
diff --git a/gaplessgrid.c b/gaplessgrid.c
deleted file mode 100644
index 10808c5..0000000
--- a/gaplessgrid.c
+++ /dev/null
@@ -1,35 +0,0 @@
-void
-gaplessgrid(Monitor *m) {
- unsigned int n, cols, rows, cn, rn, i, cx, cy, cw, ch;
- Client *c;
-
- for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) ;
- if(n == 0)
- return;
-
- /* grid dimensions */
- for(cols = 0; cols <= n/2; cols++)
- if(cols*cols >= n)
- break;
- if(n == 5) /* set layout against the general calculation: not 1:2:2, but 2:3 */
- cols = 2;
- rows = n/cols;
-
- /* window geometries */
- cw = cols ? m->ww / cols : m->ww;
- cn = 0; /* current column number */
- rn = 0; /* current row number */
- for(i = 0, c = nexttiled(m->clients); c; i++, c = nexttiled(c->next)) {
- if(i/rows + 1 > cols - n%cols)
- rows = n/cols + 1;
- ch = rows ? m->wh / rows : m->wh;
- cx = m->wx + cn*cw;
- cy = m->wy + rn*ch;
- resize(c, cx, cy, cw - 2 * c->bw, ch - 2 * c->bw, False);
- rn++;
- if(rn >= rows) {
- rn = 0;
- cn++;
- }
- }
-}
diff --git a/patches/dwm-gaplessgrid-20160731-56a31dc.diff b/patches/dwm-gaplessgrid-20160731-56a31dc.diff
deleted file mode 100644
index 4f3bb13..0000000
--- a/patches/dwm-gaplessgrid-20160731-56a31dc.diff
+++ /dev/null
@@ -1,43 +0,0 @@
-URL: http://dwm.suckless.org/patches/gapless_grid
-Add gapless grid layout.
-
-Index: dwm/gaplessgrid.c
-===================================================================
---- /dev/null
-+++ dwm/gaplessgrid.c
-@@ -0,0 +1,35 @@
-+void
-+gaplessgrid(Monitor *m) {
-+ unsigned int n, cols, rows, cn, rn, i, cx, cy, cw, ch;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) ;
-+ if(n == 0)
-+ return;
-+
-+ /* grid dimensions */
-+ for(cols = 0; cols <= n/2; cols++)
-+ if(cols*cols >= n)
-+ break;
-+ if(n == 5) /* set layout against the general calculation: not 1:2:2, but 2:3 */
-+ cols = 2;
-+ rows = n/cols;
-+
-+ /* window geometries */
-+ cw = cols ? m->ww / cols : m->ww;
-+ cn = 0; /* current column number */
-+ rn = 0; /* current row number */
-+ for(i = 0, c = nexttiled(m->clients); c; i++, c = nexttiled(c->next)) {
-+ if(i/rows + 1 > cols - n%cols)
-+ rows = n/cols + 1;
-+ ch = rows ? m->wh / rows : m->wh;
-+ cx = m->wx + cn*cw;
-+ cy = m->wy + rn*ch;
-+ resize(c, cx, cy, cw - 2 * c->bw, ch - 2 * c->bw, False);
-+ rn++;
-+ if(rn >= rows) {
-+ rn = 0;
-+ cn++;
-+ }
-+ }
-+}