mirror of
https://git.sr.ht/~coasteen/dotfiles
synced 2025-11-04 14:47:38 +01:00
Upload files to ".suckless/patch"
This commit is contained in:
parent
ed373fd5c1
commit
0aed92ec99
5 changed files with 120 additions and 0 deletions
2
.suckless/patch/fullscreen.h
Normal file
2
.suckless/patch/fullscreen.h
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
static void fullscreen(const Arg *arg);
|
||||
|
||||
27
.suckless/patch/include.c
Normal file
27
.suckless/patch/include.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* Bar functionality */
|
||||
#include "bar_indicators.c"
|
||||
#include "bar_tagicons.c"
|
||||
#include "bar.c"
|
||||
|
||||
#include "bar_alpha.c"
|
||||
#include "bar_ltsymbol.c"
|
||||
#include "bar_status.c"
|
||||
#include "bar_tags.c"
|
||||
#include "bar_wintitle.c"
|
||||
|
||||
/* Other patches */
|
||||
#include "attachx.c"
|
||||
#include "cool_autostart.c"
|
||||
#include "dwmc.c"
|
||||
#include "fullscreen.c"
|
||||
#include "moveresize.c"
|
||||
#include "movestack.c"
|
||||
#include "scratchpad.c"
|
||||
#include "swallow.c"
|
||||
#include "togglefullscreen.c"
|
||||
#include "vanitygaps.c"
|
||||
#include "xrdb.c"
|
||||
/* Layouts */
|
||||
#include "layout_facts.c"
|
||||
#include "layout_tile.c"
|
||||
|
||||
26
.suckless/patch/include.h
Normal file
26
.suckless/patch/include.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* Bar functionality */
|
||||
#include "bar_indicators.h"
|
||||
#include "bar_tagicons.h"
|
||||
#include "bar.h"
|
||||
|
||||
#include "bar_alpha.h"
|
||||
#include "bar_ltsymbol.h"
|
||||
#include "bar_status.h"
|
||||
#include "bar_tags.h"
|
||||
#include "bar_wintitle.h"
|
||||
|
||||
/* Other patches */
|
||||
#include "attachx.h"
|
||||
#include "cool_autostart.h"
|
||||
#include "dwmc.h"
|
||||
#include "fullscreen.h"
|
||||
#include "moveresize.h"
|
||||
#include "movestack.h"
|
||||
#include "scratchpad.h"
|
||||
#include "swallow.h"
|
||||
#include "togglefullscreen.h"
|
||||
#include "vanitygaps.h"
|
||||
#include "xrdb.h"
|
||||
/* Layouts */
|
||||
#include "layout_tile.h"
|
||||
|
||||
24
.suckless/patch/layout_facts.c
Normal file
24
.suckless/patch/layout_facts.c
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
void
|
||||
getfacts(Monitor *m, int msize, int ssize, float *mf, float *sf, int *mr, int *sr)
|
||||
{
|
||||
unsigned int n;
|
||||
float mfacts, sfacts;
|
||||
int mtotal = 0, stotal = 0;
|
||||
Client *c;
|
||||
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
|
||||
mfacts = MIN(n, m->nmaster);
|
||||
sfacts = n - m->nmaster;
|
||||
|
||||
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++)
|
||||
if (n < m->nmaster)
|
||||
mtotal += msize / mfacts;
|
||||
else
|
||||
stotal += ssize / sfacts;
|
||||
|
||||
*mf = mfacts; // total factor of master area
|
||||
*sf = sfacts; // total factor of stack area
|
||||
*mr = msize - mtotal; // the remainder (rest) of pixels after an even master split
|
||||
*sr = ssize - stotal; // the remainder (rest) of pixels after an even stack split
|
||||
}
|
||||
|
||||
41
.suckless/patch/layout_tile.c
Normal file
41
.suckless/patch/layout_tile.c
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
static void
|
||||
tile(Monitor *m)
|
||||
{
|
||||
unsigned int i, n;
|
||||
int mx = 0, my = 0, mh = 0, mw = 0;
|
||||
int sx = 0, sy = 0, sh = 0, sw = 0;
|
||||
float mfacts, sfacts;
|
||||
int mrest, srest;
|
||||
Client *c;
|
||||
|
||||
|
||||
int oh, ov, ih, iv;
|
||||
getgaps(m, &oh, &ov, &ih, &iv, &n);
|
||||
|
||||
if (n == 0)
|
||||
return;
|
||||
|
||||
sx = mx = m->wx + ov;
|
||||
sy = my = m->wy + oh;
|
||||
mh = m->wh - 2*oh - ih * (MIN(n, m->nmaster) - 1);
|
||||
sh = m->wh - 2*oh - ih * (n - m->nmaster - 1);
|
||||
sw = mw = m->ww - 2*ov;
|
||||
|
||||
if (m->nmaster && n > m->nmaster) {
|
||||
sw = (mw - iv) * (1 - m->mfact);
|
||||
mw = (mw - iv) * m->mfact;
|
||||
sx = mx + mw + iv;
|
||||
}
|
||||
|
||||
getfacts(m, mh, sh, &mfacts, &sfacts, &mrest, &srest);
|
||||
|
||||
for (i = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
|
||||
if (i < m->nmaster) {
|
||||
resize(c, mx, my, mw - (2*c->bw), (mh / mfacts) + (i < mrest ? 1 : 0) - (2*c->bw), 0);
|
||||
my += HEIGHT(c) + ih;
|
||||
} else {
|
||||
resize(c, sx, sy, sw - (2*c->bw), (sh / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
|
||||
sy += HEIGHT(c) + ih;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue