Add awful.client.setmaster
This function is the counterpart of awful.client.setslave. Windows is moved to the first position in the stack. Signed-off-by: Sébastien Luttringer <seblu@seblu.net> Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
0817c7f460
commit
a6ae34d003
|
@ -410,6 +410,15 @@ function client.getmaster(screen)
|
|||
return client.visible(s)[1]
|
||||
end
|
||||
|
||||
--- Set the client as master: put it at the beginning of other windows.
|
||||
-- @param c The window to set as master.
|
||||
function client.setmaster(c)
|
||||
local cls = util.table.reverse(capi.client.get(c.screen))
|
||||
for k, v in pairs(cls) do
|
||||
c:swap(v)
|
||||
end
|
||||
end
|
||||
|
||||
--- Set the client as slave: put it at the end of other windows.
|
||||
-- @param c The window to set as slave.
|
||||
function client.setslave(c)
|
||||
|
|
Loading…
Reference in New Issue