awful.tag: allow table as layout argument (FS#670)
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
148e095fa9
commit
b853f2df0a
|
@ -33,7 +33,7 @@ history.limit = 20
|
||||||
--- Create a set of tags and attach it to a screen.
|
--- Create a set of tags and attach it to a screen.
|
||||||
-- @param names The tag name, in a table
|
-- @param names The tag name, in a table
|
||||||
-- @param screen The tag screen, or 1 if not set.
|
-- @param screen The tag screen, or 1 if not set.
|
||||||
-- @param layout The layout to set for this tags by default.
|
-- @param layout The layout or layout table to set for this tags by default.
|
||||||
-- @return A table with all created tags.
|
-- @return A table with all created tags.
|
||||||
function new(names, screen, layout)
|
function new(names, screen, layout)
|
||||||
local screen = screen or 1
|
local screen = screen or 1
|
||||||
|
@ -45,7 +45,7 @@ function new(names, screen, layout)
|
||||||
if id == 1 then
|
if id == 1 then
|
||||||
tags[#tags].selected = true
|
tags[#tags].selected = true
|
||||||
end
|
end
|
||||||
setproperty(tags[#tags], "layout", layout)
|
setproperty(tags[#tags], "layout", layout[#tags] or layout[1] or layout)
|
||||||
end
|
end
|
||||||
return tags
|
return tags
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue