diff -r 4070d154349d client.c --- a/client.c Sat Feb 24 15:41:05 2007 +0100 +++ b/client.c Sat Feb 24 17:37:25 2007 +0100 @@ -384,3 +384,33 @@ unmanage(Client *c) { XUngrabServer(dpy); lt->arrange(); } + +void +moveresize(const char *arg) { + if (!sel || !sel->isfloating || strlen(arg) == 0) { return; } + + int *rs_val = NULL; + + Client tmp_client; + tmp_client.x = sel->x; + tmp_client.y = sel->y; + tmp_client.w = sel->w; + tmp_client.h = sel->h; + + switch (arg[0]) + { + case 'x': rs_val = &(tmp_client.x); break; + case 'y': rs_val = &(tmp_client.y); break; + case 'w': rs_val = &(tmp_client.w); break; + case 'h': rs_val = &(tmp_client.h); break; + default: return; + } + + if (arg[1] == '-' || arg[1] == '+') + /* relative resize instead of absolute */ + (*rs_val) += atoi(arg+1); + else + (*rs_val) = atoi(arg+1); + + resize(sel, tmp_client.x, tmp_client.y, tmp_client.w, tmp_client.h, False); +} diff -r 4070d154349d dwm.h --- a/dwm.h Sat Feb 24 15:41:05 2007 +0100 +++ b/dwm.h Sat Feb 24 17:28:35 2007 +0100 @@ -107,6 +107,7 @@ void updatesizehints(Client *c); /* upd void updatesizehints(Client *c); /* update the size hint variables of c */ void updatetitle(Client *c); /* update the name of c */ void unmanage(Client *c); /* destroy c */ +void moveresize(const char *arg); /* move or resize client */ /* draw.c */ void drawstatus(void); /* draw the bar */