Add shortcut change gaps

This commit is contained in:
BitHeaven 2022-09-27 15:48:45 +05:00 committed by GitHub
parent 300007e7a7
commit a6886856b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

11
dwm.c
View File

@ -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)
{