From 0457bb6fd0a1214e5c74ed55bcefe32d35e2f45b Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 12 Jun 2021 09:05:59 +0200 Subject: pager: accept workspace in the constructor Connect the desktop:view signal internally, instead of having the caller (tasklist creating code) do it. --- rc.lua | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'rc.lua') diff --git a/rc.lua b/rc.lua index 011218f..78379e2 100644 --- a/rc.lua +++ b/rc.lua @@ -97,16 +97,9 @@ for s in screen do layout_utils:add(layoutbox_container) -- Create a tasklist widget - local pgr = pager.Pager:new(s) + local pgr = pager.Pager:new(wsp, s) pgr:set_desktop(wsp.desktops[s.index]) - wsp.signals:connect_signal("desktop:view", - function(signals, view_screen, desktop) - if view_screen == s then - pgr:set_desktop(desktop) - end - end) - -- Widgets that are aligned to the bottom of the tool bar local layout_bottom = wibox.layout.fixed.vertical() -- cgit v1.2.3