Update: Add lowest mfact float
This commit is contained in:
parent
c0428306dc
commit
bcfbc2e218
|
@ -8,6 +8,7 @@
|
||||||
!!
|
!!
|
||||||
!! Fonts are picked based on (A) order in the list below and (B) what fonts have the character that should be printed.
|
!! Fonts are picked based on (A) order in the list below and (B) what fonts have the character that should be printed.
|
||||||
!! If you want more than three fonts, add a comma to font3 and add another to it.
|
!! If you want more than three fonts, add a comma to font3 and add another to it.
|
||||||
|
!!
|
||||||
- speedwm.font: NotoSans-Regular:size=8:antialiasing=true
|
- speedwm.font: NotoSans-Regular:size=8:antialiasing=true
|
||||||
- speedwm.font2: fontawesome:size=8
|
- speedwm.font2: fontawesome:size=8
|
||||||
- speedwm.font3: Noto Color Emoji:size=8
|
- speedwm.font3: Noto Color Emoji:size=8
|
||||||
|
@ -103,6 +104,10 @@
|
||||||
!!
|
!!
|
||||||
- speedwm.mfact: 0.50
|
- speedwm.mfact: 0.50
|
||||||
!!
|
!!
|
||||||
|
!! Lowest possible mfact.
|
||||||
|
!!
|
||||||
|
- speedwm.lowestmfact: 0.05
|
||||||
|
!!
|
||||||
!! Start on tag. If this is set to 1, speedwm will start on tag 1. If it is set to 0, then speedwm will not start on tag 1. (1/0)
|
!! Start on tag. If this is set to 1, speedwm will start on tag 1. If it is set to 0, then speedwm will not start on tag 1. (1/0)
|
||||||
!!
|
!!
|
||||||
- speedwm.startontag: 1
|
- speedwm.startontag: 1
|
||||||
|
|
|
@ -118,6 +118,7 @@ static int refreshrules = 1; /* Refresh rules when a CLASS
|
||||||
static int i3nmaster = 0; /* Enable i3-gaps like nmaster (1/0) */
|
static int i3nmaster = 0; /* Enable i3-gaps like nmaster (1/0) */
|
||||||
static int mousemfact = 1; /* Enable adjusting mfact using the mouse (1/0) */
|
static int mousemfact = 1; /* Enable adjusting mfact using the mouse (1/0) */
|
||||||
static float mfact = 0.50; /* Default mfact value. 0.50 = each gets half the available space */
|
static float mfact = 0.50; /* Default mfact value. 0.50 = each gets half the available space */
|
||||||
|
static float lowestmfact = 0.05; /* Lowest possible mfact value on top of the existing. */
|
||||||
|
|
||||||
/* Window gap options */
|
/* Window gap options */
|
||||||
static int enablegaps = 1; /* Enable gaps */
|
static int enablegaps = 1; /* Enable gaps */
|
||||||
|
@ -216,6 +217,7 @@ static int barheight = 5; /* Bar height in px, 0 = calc
|
||||||
static int barposition = 1; /* Bar position. Top: 0, Bottom: 1 */
|
static int barposition = 1; /* Bar position. Top: 0, Bottom: 1 */
|
||||||
static int barpaddingv = 10; /* How much padding to have vertically in pixels */
|
static int barpaddingv = 10; /* How much padding to have vertically in pixels */
|
||||||
static int barpaddingh = 10; /* How much padding to have horizontally in pixels */
|
static int barpaddingh = 10; /* How much padding to have horizontally in pixels */
|
||||||
|
static int barpaddinggaps = 1; /* Set barpadding to the gaps */
|
||||||
static int leftlayout = 1; /* Layout indicator on the left (1) or on the right (0) */
|
static int leftlayout = 1; /* Layout indicator on the left (1) or on the right (0) */
|
||||||
|
|
||||||
/* Tag text options */
|
/* Tag text options */
|
||||||
|
|
16
speedwm.c
16
speedwm.c
|
@ -620,6 +620,10 @@ static xcb_connection_t *xcon;
|
||||||
/* Modifiers */
|
/* Modifiers */
|
||||||
#define CONTROL ControlMask
|
#define CONTROL ControlMask
|
||||||
#define SHIFT ShiftMask
|
#define SHIFT ShiftMask
|
||||||
|
#define ALT Mod1Mask
|
||||||
|
#define ALTR Mod3Mask
|
||||||
|
#define SUPER Mod4Mask
|
||||||
|
#define SHIFTL Mod5Mask
|
||||||
|
|
||||||
|
|
||||||
/* Rest of the headers */
|
/* Rest of the headers */
|
||||||
|
@ -2573,6 +2577,11 @@ void
|
||||||
togglegaps(const Arg *arg)
|
togglegaps(const Arg *arg)
|
||||||
{
|
{
|
||||||
enablegaps = !enablegaps;
|
enablegaps = !enablegaps;
|
||||||
|
|
||||||
|
if (barpaddingv != 0 && barpaddingh != 0 && barpaddinggaps && enablegaps) {
|
||||||
|
updatebarpos(selmon);
|
||||||
|
}
|
||||||
|
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4081,7 +4090,7 @@ setmfact(const Arg *arg)
|
||||||
if (!arg || !selmon->lt[selmon->sellt]->arrange)
|
if (!arg || !selmon->lt[selmon->sellt]->arrange)
|
||||||
return;
|
return;
|
||||||
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
|
f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0;
|
||||||
if (f < 0.05 || f > 0.95)
|
if (f < 0.05 - lowestmfact || f > 0.95 + lowestmfact )
|
||||||
return;
|
return;
|
||||||
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
|
selmon->mfact = selmon->pertag->mfacts[selmon->pertag->curtag] = f;
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
|
@ -4722,7 +4731,10 @@ updatebarpos(Monitor *m)
|
||||||
{
|
{
|
||||||
m->wy = m->my;
|
m->wy = m->my;
|
||||||
m->wh = m->mh;
|
m->wh = m->mh;
|
||||||
if (m->showbar) {
|
if (barpaddingv != 0 && barpaddingh != 0 && barpaddinggaps && enablegaps) {
|
||||||
|
barpaddingv = gappov;
|
||||||
|
barpaddingh = gappoh;
|
||||||
|
} if (m->showbar) {
|
||||||
m->wh = m->wh - barpaddingv - m->bh;
|
m->wh = m->wh - barpaddingv - m->bh;
|
||||||
m->by = m->barposition ? m->wy : m->wy + m->wh + barpaddingv;
|
m->by = m->barposition ? m->wy : m->wy + m->wh + barpaddingv;
|
||||||
m->wy = m->barposition ? m->wy + m->bh + vp : m->wy;
|
m->wy = m->barposition ? m->wy + m->bh + vp : m->wy;
|
||||||
|
|
|
@ -195,5 +195,6 @@ ResourcePref resources[] = {
|
||||||
{ "floatscratchpad", INTEGER, &floatscratchpad },
|
{ "floatscratchpad", INTEGER, &floatscratchpad },
|
||||||
{ "altbar", INTEGER, &altbar },
|
{ "altbar", INTEGER, &altbar },
|
||||||
{ "mfact", FLOAT, &mfact },
|
{ "mfact", FLOAT, &mfact },
|
||||||
|
{ "lowestmfact", FLOAT, &lowestmfact },
|
||||||
/* value in .Xresources type value in speedwm */
|
/* value in .Xresources type value in speedwm */
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue