[awful] client_moveresize(+/- x-offset, +/- y-offset, +/- width, +/- height)

e.g.:
awful.client.moveresize(10, 0, 0, 0) --increase x-offset by 10 pixels -> moves it to the right
awful.client.moveresize(0, 0, -10, 0) --decreases width of client by 10 pixels

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
marco candrian 2008-06-06 01:17:41 +02:00 committed by Julien Danjou
parent 2b4ffb4b74
commit 57227075d9
1 changed files with 17 additions and 5 deletions

View File

@ -73,6 +73,17 @@ function client_swap(i)
end end
end end
-- Move/resize a client relativ to current coordinates.
function client_moveresize(x, y, w, h)
local sel = client.focus_get()
local coords = sel:coords_get()
coords['x'] = coords['x'] + x
coords['y'] = coords['y'] + y
coords['width'] = coords['width'] + w
coords['height'] = coords['height'] + h
sel:coords_set(coords)
end
function screen_focus(i) function screen_focus(i)
local sel = client.focus_get() local sel = client.focus_get()
local s local s
@ -342,6 +353,7 @@ P.client =
movetotag = client_movetotag; movetotag = client_movetotag;
toggletag = client_toggletag; toggletag = client_toggletag;
togglefloating = client_togglefloating; togglefloating = client_togglefloating;
moveresize = client_moveresize;
} }
P.screen = P.screen =
{ {