From b59495e1e72632136e5c7394ffa91b331da1fd6d Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 27 Nov 2017 00:50:03 -0500 Subject: [PATCH] tag/tasklist: Update rc.lua And the tests to avoid some deprecation warnings --- awesomerc.lua | 12 ++++++++++-- tests/_wibox_helper.lua | 10 ++++++++-- tests/test-leaks.lua | 4 ++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/awesomerc.lua b/awesomerc.lua index d08dc189d..d25659ffe 100644 --- a/awesomerc.lua +++ b/awesomerc.lua @@ -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 diff --git a/tests/_wibox_helper.lua b/tests/_wibox_helper.lua index 5c7afdc2b..d60ad7f8c 100644 --- a/tests/_wibox_helper.lua +++ b/tests/_wibox_helper.lua @@ -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 diff --git a/tests/test-leaks.lua b/tests/test-leaks.lua index 86c86b138..e7aa1d34f 100644 --- a/tests/test-leaks.lua +++ b/tests/test-leaks.lua @@ -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())