awful.widget: add support for __call on ta{g,sk}list widgets
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
43902aed69
commit
fe35104bc2
|
@ -162,10 +162,10 @@ for s = 1, screen.count() do
|
|||
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
|
||||
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
|
||||
-- Create a taglist widget
|
||||
mytaglist[s] = awful.widget.taglist.new(s, awful.widget.taglist.label.all, mytaglist.buttons)
|
||||
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
|
||||
|
||||
-- Create a tasklist widget
|
||||
mytasklist[s] = awful.widget.tasklist.new(function(c)
|
||||
mytasklist[s] = awful.widget.tasklist(function(c)
|
||||
return awful.widget.tasklist.label.currenttags(c, s)
|
||||
end, mytasklist.buttons)
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ local capi = { widget = widget,
|
|||
client = client }
|
||||
local type = type
|
||||
local setmetatable = setmetatable
|
||||
local unpack = unpack
|
||||
local pairs = pairs
|
||||
local ipairs = ipairs
|
||||
local hooks = require("awful.hooks")
|
||||
|
@ -169,4 +170,6 @@ function label.noempty(t, args)
|
|||
end
|
||||
end
|
||||
|
||||
setmetatable(_M, { __call = function(_, ...) return new(unpack(arg)) end })
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -10,6 +10,7 @@ local capi = { screen = screen,
|
|||
client = client }
|
||||
local ipairs = ipairs
|
||||
local setmetatable = setmetatable
|
||||
local unpack = unpack
|
||||
local table = table
|
||||
local hooks = require("awful.hooks")
|
||||
local common = require("awful.widget.common")
|
||||
|
@ -178,4 +179,6 @@ function label.currenttags(c, screen, args)
|
|||
end
|
||||
end
|
||||
|
||||
setmetatable(_M, { __call = function(_, ...) return new(unpack(arg)) end })
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
Loading…
Reference in New Issue