diff --git a/src/config.h b/src/config.h index f36d928..145a638 100644 --- a/src/config.h +++ b/src/config.h @@ -112,10 +112,10 @@ static Key keys[] = { { MODKEY, XK_period, focusmon, {.i = +1 } }, { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_x, spawn, {.v = betterlockscreencmd}}, - { MODKEY, XK_Print, spawn, {.v = spectaclecmd}}, - { MODKEY, XK_u, spawn, {.v = cmuspausecmd}}, - { MODKEY, XK_g, setgaps, {.v = cmuspausecmd}}, + { MODKEY|ShiftMask, XK_x, spawn, {.v = betterlockscreencmd} }, + { MODKEY, XK_Print, spawn, {.v = spectaclecmd} }, + { MODKEY, XK_u, spawn, {.v = cmuspausecmd} }, + { MODKEY, XK_g, togglegaps, {0} }, TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) diff --git a/src/dwm.c b/src/dwm.c index 3994323..e59c605 100644 --- a/src/dwm.c +++ b/src/dwm.c @@ -1691,7 +1691,12 @@ setgaps(const Arg *arg) void togglegaps(const Arg *arg) { - + if(selmon->gappx == 0) { + selmon->gappx = gappx; + } else { + selmon->gappx = 0; + } + arrange(selmon); } void