awful: add client.setslave()

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-09-10 17:04:54 +02:00
parent d1d9d3bb52
commit 1cdd098fb1
2 changed files with 14 additions and 0 deletions

View File

@ -393,6 +393,10 @@ function hook_manage(c)
awful.client.movetotag(tags[target.screen][target.tag], c) awful.client.movetotag(tags[target.screen][target.tag], c)
end end
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Honor size hints -- Honor size hints
c.honorsizehints = true c.honorsizehints = true
end end

View File

@ -331,6 +331,16 @@ function client.master(screen)
return capi.client.visible_get(s)[1] return capi.client.visible_get(s)[1]
end end
-- Set the client as slave: put it at the end of other windows.
-- @param c The window to set as slave.
-- @return
function client.setslave(c)
local cls = capi.client.visible_get(c.screen)
for k, v in pairs(cls) do
c:swap(v)
end
end
--- Move/resize a client relative to current coordinates. --- Move/resize a client relative to current coordinates.
-- @param x The relative x coordinate. -- @param x The relative x coordinate.
-- @param y The relative y coordinate. -- @param y The relative y coordinate.