From a34914ccb4737583e0734352af0eaca3b7b2a7e9 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Mon, 24 Aug 2020 17:11:04 +0200 Subject: [PATCH] removed old wrong diff files deleted: dwm-deck_smart_master_size.diff deleted: dwm-tile_smart_master_size.diff --- patches/dwm-deck_smart_master_size.diff | 35 ----------------------- patches/dwm-tile_smart_master_size.diff | 37 ------------------------- 2 files changed, 72 deletions(-) delete mode 100644 patches/dwm-deck_smart_master_size.diff delete mode 100644 patches/dwm-tile_smart_master_size.diff diff --git a/patches/dwm-deck_smart_master_size.diff b/patches/dwm-deck_smart_master_size.diff deleted file mode 100644 index 9893efd..0000000 --- a/patches/dwm-deck_smart_master_size.diff +++ /dev/null @@ -1,35 +0,0 @@ -This patch automatically centers if only one window is open in the deck layout (and that window can't make use of the whole screen) -If there are multiple windows and the master window does not take up all it's alloted space, everything will be adjusted so no empty space is created. (only if there is only one master) ---- dwm.c 2020-08-24 09:43:01.749752454 +0200 -+++ dwm.c 2020-08-24 09:43:23.786418316 +0200 -@@ -673,15 +673,28 @@ - - void - deck(Monitor *m) { -- unsigned int i, n, h, mw, my; -+ unsigned int i, n, h, mw, my, altw, nx; - Client *c; - - for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if(n == 0) - return; -- -+ if (n == 1){ -+ c = nexttiled(m->clients); -+ altw = WIDTH(c) * m->wh / HEIGHT(c); /*use max window height but preserve aspect ratio */ -+ if ( c->mina > 0 && altw < c->mon->mw ){ -+ nx = m->mx + (m->mw - altw ) / 2; -+ resize(c, nx , c->y, altw , c->h, 0); -+ return; -+ } -+ } - if(n > m->nmaster) { - mw = m->nmaster ? m->ww * m->mfact : 0; -+ if (m->nmaster == 1){ -+ c = nexttiled(m->clients); -+ altw = WIDTH(c) * m->wh / HEIGHT(c); /*use max window height but preserve aspect ratio */ -+ mw = c->mina > 0 && altw < mw ? altw : mw; -+ } - snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n - m->nmaster); - } - else diff --git a/patches/dwm-tile_smart_master_size.diff b/patches/dwm-tile_smart_master_size.diff deleted file mode 100644 index b09f9d8..0000000 --- a/patches/dwm-tile_smart_master_size.diff +++ /dev/null @@ -1,37 +0,0 @@ -This patch automatically centers if only one window is open in the tile layout (and that window can't make use of the whole screen) -If there are multiple windows and the master window does not take up all it's alloted space, everything will be adjusted so no empty space is created. (only if there is only one master) ---- dwm.c 2020-08-24 09:43:01.749752454 +0200 -+++ dwm.c 2020-08-24 09:43:23.786418316 +0200 -@@ -1750,15 +1763,30 @@ - void - tile(Monitor *m) - { -- unsigned int i, n, h, mw, my, ty; -+ unsigned int i, n, h, mw, my, ty, altw, nx; - Client *c; - - for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++); - if (n == 0) - return; -+ if (n == 1){ -+ c = nexttiled(m->clients); -+ altw = WIDTH(c) * m->wh / HEIGHT(c); /*use max window height but preserve aspect ratio */ -+ if ( c->mina > 0 && altw < c->mon->mw ){ -+ nx = m->mx + (m->mw - altw ) / 2; -+ resize(c, nx , c->y, altw , c->h, 0); -+ return; -+ } -+ } - -- if (n > m->nmaster) -+ if (n > m->nmaster){ - mw = m->nmaster ? m->ww * m->mfact : 0; -+ if ( m->nmaster == 1){ -+ c = nexttiled(m->clients); -+ altw = WIDTH(c) * m->wh / HEIGHT(c); /*use max window height but preserve aspect ratio */ -+ mw = c->mina > 0 && altw < mw ? altw : mw; -+ } -+ } - else - mw = m->ww; - for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)