Hi,
I would like to implement border actions in my configuration, like in
compiz, gnome 3 (at least I heard of that feature in gnome 3) or
windows7.
Basically, it could do anything once it's implemented; my own purpose
limits to "manual tiling", eg. moving windows to the side and make them
use 100% height and 50% width (aligned on the moved side).
My problem is that nothing happens. Maybe signal property::x isn't the
best way to start. A better way would be something like
"startMoveClient", "grabClient" or such thing, running
mousegrabber...the function could compare the mouse position to MAX_X
or 0 as soon as mouse_btn1 is up again (no more comparing all the time),
but I could not find such a signal.
So here's the code, bugfixes and improvements welcome (it spills no
errors, but doesn't work yet):
client.add_signal("property::x", function(c)
if (mouse.coords().x ==
screen[mouse.screen].workarea.geom.width) or (mouse.coords().x == 0)
then -- set position of the client
if (mouse.coords().x ==
screen[mouse.screen].workarea.geom.width) then
awful.client.property.set(c, "x",
screen[mouse.screen].workarea.geom.width/2) elseif (mouse.coords().x ==
0) then awful.client.property.set(c, "x", 0)
end
awful.client.property.set(c, "y",
screen[mouse.screen].workarea.geom.height)
-- set width to 50%, height to 100%
awful.client.property.set(c, "height",
screen[mouse.screen].workarea.geom.height)
awful.client.property.set(c, "width",
screen[mouse.screen].workarea.geom.width/2)
end
end)
--
To unsubscribe, send mail to [email protected].