[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:
parent
2b4ffb4b74
commit
57227075d9
12
awful.lua
12
awful.lua
|
@ -73,6 +73,17 @@ function client_swap(i)
|
|||
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)
|
||||
local sel = client.focus_get()
|
||||
local s
|
||||
|
@ -342,6 +353,7 @@ P.client =
|
|||
movetotag = client_movetotag;
|
||||
toggletag = client_toggletag;
|
||||
togglefloating = client_togglefloating;
|
||||
moveresize = client_moveresize;
|
||||
}
|
||||
P.screen =
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue