dwm

dynamic window manager - with my changes
git clone https://pi.duncano.de/git/dwm.git
Log | Files | Refs | README | LICENSE

commit 4665f9bb3e1c300a9537a2e7b54f2c1131df80a5
parent 7a0d4d2391420ce75c2f3590048df19d7c8e702a
Author: Duncaen <mail@duncano.de>
Date:   Thu, 23 Jun 2016 22:06:34 +0200

add function to move and resize floating windows for key bindings

Diffstat:
dwm.c | 44++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+), 0 deletions(-)

diff --git a/dwm.c b/dwm.c @@ -234,6 +234,10 @@ static int xerror(Display *dpy, XErrorEvent *ee); static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); +static void movex(const Arg *arg); +static void movey(const Arg *arg); +static void resizew(const Arg *arg); +static void resizeh(const Arg *arg); /* variables */ static const char broken[] = "broken"; @@ -2145,6 +2149,46 @@ zoom(const Arg *arg) pop(c); } +void +movex(const Arg *arg) +{ + Client *c = selmon->sel; + + if (!c->isfloating) + return; + resize(c, c->x + arg->i, c->y, c->w, c->h, 1); +} + +void +movey(const Arg *arg) +{ + Client *c = selmon->sel; + + if (!c->isfloating) + return; + resize(c, c->x, c->y + arg->i, c->w, c->h, 1); +} + +void +resizew(const Arg *arg) +{ + Client *c = selmon->sel; + + if (!c->isfloating) + return; + resize(c, c->x, c->y, c->w + arg->i, c->h, 1); +} + +void +resizeh(const Arg *arg) +{ + Client *c = selmon->sel; + + if (!c->isfloating) + return; + resize(c, c->x, c->y, c->w, c->h + arg->i, 1); +} + int main(int argc, char *argv[]) {