tag/tasklist: Update rc.lua

And the tests to avoid some deprecation warnings
This commit is contained in:
Emmanuel Lepage Vallee 2017-11-27 00:50:03 -05:00
parent b446a9bdb8
commit b59495e1e7
3 changed files with 20 additions and 6 deletions

View file

@ -210,10 +210,18 @@ awful.screen.connect_for_each_screen(function(s)
awful.button({ }, 4, function () awful.layout.inc( 1) end),
awful.button({ }, 5, function () awful.layout.inc(-1) end)))
-- Create a taglist widget
s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons)
s.mytaglist = awful.widget.taglist {
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons
}
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons)
s.mytasklist = awful.widget.tasklist {
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons
}
-- @DOC_WIBAR@
-- Create the wibox

View file

@ -8,7 +8,10 @@ return { create_wibox = function()
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(awful.widget.launcher({ image = img, command = "bash" }))
left_layout:add(awful.widget.taglist(1, awful.widget.taglist.filter.all))
left_layout:add(awful.widget.taglist {
screen = 1,
filter = awful.widget.taglist.filter.all
})
left_layout:add(awful.widget.prompt())
-- Widgets that are aligned to the right
@ -20,7 +23,10 @@ return { create_wibox = function()
-- Now bring it all together (with the tasklist in the middle)
local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout)
layout:set_middle(awful.widget.tasklist(1, awful.widget.tasklist.filter.currenttags))
layout:set_middle(awful.widget.tasklist {
screen = 1,
filter = awful.widget.tasklist.filter.currenttags
})
layout:set_right(right_layout)
-- Create wibox

View file

@ -73,10 +73,10 @@ prepare_for_collect = emit_refresh
collectable(tooltip_now())
prepare_for_collect = emit_refresh
collectable(awful.widget.taglist(1, awful.widget.taglist.filter.all))
collectable(awful.widget.taglist{screen=1, filter=awful.widget.taglist.filter.all})
prepare_for_collect = emit_refresh
collectable(awful.widget.tasklist(1, awful.widget.tasklist.filter.currenttags))
collectable(awful.widget.tasklist{screen=1, filter=awful.widget.tasklist.filter.currenttags})
prepare_for_collect = emit_refresh
collectable(create_wibox())