summaryrefslogtreecommitdiff
path: root/layouts.c
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-10-07 03:36:35 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-10-07 03:36:35 +0530
commitd2cb1d60c7eedb2b339221318c993ba35789eecf (patch)
treeb8e8e4f2b92a529fcd8d635f7146d30927f0e9bc /layouts.c
parentb915db4f2fcb3486e3a22fbe51ac7739e01507c1 (diff)
dwm-6.3
Diffstat (limited to 'layouts.c')
-rw-r--r--layouts.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/layouts.c b/layouts.c
deleted file mode 100644
index d26acf3..0000000
--- a/layouts.c
+++ /dev/null
@@ -1,27 +0,0 @@
-void
-grid(Monitor *m) {
- unsigned int i, n, cx, cy, cw, ch, aw, ah, cols, rows;
- Client *c;
-
- for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next))
- n++;
-
- /* grid dimensions */
- for(rows = 0; rows <= n/2; rows++)
- if(rows*rows >= n)
- break;
- cols = (rows && (rows - 1) * rows >= n) ? rows - 1 : rows;
-
- /* window geoms (cell height/width) */
- ch = m->wh / (rows ? rows : 1);
- cw = m->ww / (cols ? cols : 1);
- for(i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
- cx = m->wx + (i / rows) * cw;
- cy = m->wy + (i % rows) * ch;
- /* adjust height/width of last row/column's windows */
- ah = ((i + 1) % rows == 0) ? m->wh - ch * rows : 0;
- aw = (i >= rows * (cols - 1)) ? m->ww - cw * cols : 0;
- resize(c, cx, cy, cw - 2 * c->bw + aw, ch - 2 * c->bw + ah, False);
- i++;
- }
-}