summaryrefslogtreecommitdiff
path: root/rc.lua
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-06-12 09:05:59 +0200
committerAnton Khirnov <anton@khirnov.net>2021-06-12 09:05:59 +0200
commit0457bb6fd0a1214e5c74ed55bcefe32d35e2f45b (patch)
tree09163b21fd3057bd1b721677798e5eec9fc6e4ed /rc.lua
parent82ed6ed9242675313e1835b18356b2b1e91fb4b0 (diff)
pager: accept workspace in the constructor
Connect the desktop:view signal internally, instead of having the caller (tasklist creating code) do it.
Diffstat (limited to 'rc.lua')
-rw-r--r--rc.lua9
1 files changed, 1 insertions, 8 deletions
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()