Added togglegaps

pull/13/head
E. Almqvist 4 years ago
parent 50952da422
commit ff9e3c1b77
  1. 8
      src/config.h
  2. 7
      src/dwm.c

@ -112,10 +112,10 @@ static Key keys[] = {
{ MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_x, spawn, {.v = betterlockscreencmd}}, { MODKEY|ShiftMask, XK_x, spawn, {.v = betterlockscreencmd} },
{ MODKEY, XK_Print, spawn, {.v = spectaclecmd}}, { MODKEY, XK_Print, spawn, {.v = spectaclecmd} },
{ MODKEY, XK_u, spawn, {.v = cmuspausecmd}}, { MODKEY, XK_u, spawn, {.v = cmuspausecmd} },
{ MODKEY, XK_g, setgaps, {.v = cmuspausecmd}}, { MODKEY, XK_g, togglegaps, {0} },
TAGKEYS( XK_1, 0) TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1) TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2) TAGKEYS( XK_3, 2)

@ -1691,7 +1691,12 @@ setgaps(const Arg *arg)
void void
togglegaps(const Arg *arg) togglegaps(const Arg *arg)
{ {
if(selmon->gappx == 0) {
selmon->gappx = gappx;
} else {
selmon->gappx = 0;
}
arrange(selmon);
} }
void void

Loading…
Cancel
Save