From a6886856b51fd473f7c22af827781f6970158fda Mon Sep 17 00:00:00 2001 From: BitHeaven <33015545+BitHeaven-Official@users.noreply.github.com> Date: Tue, 27 Sep 2022 15:48:45 +0500 Subject: [PATCH] Add shortcut change gaps --- dwm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dwm.c b/dwm.c index cd11179..cac95ab 100644 --- a/dwm.c +++ b/dwm.c @@ -201,6 +201,7 @@ static void sendmon(Client *c, Monitor *m); static void setclientstate(Client *c, long state); static void setfocus(Client *c); static void setfullscreen(Client *c, int fullscreen); +static void setgaps(const Arg *arg); static void setlayout(const Arg *arg); static void setmfact(const Arg *arg); static void setup(void); @@ -1620,6 +1621,16 @@ setfullscreen(Client *c, int fullscreen) } } +void +setgaps(const Arg *arg) +{ + if ((arg->i == 0) || (selmon->gappx + arg->i < 0)) + selmon->gappx = 0; + else + selmon->gappx += arg->i; + arrange(selmon); +} + void setlayout(const Arg *arg) {