From 5177d3eab6276fefc846d730a6f64065d1aeedd0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 8 Apr 2020 17:20:40 +0200 Subject: workspace: add desktops automatically --- rc.lua | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'rc.lua') diff --git a/rc.lua b/rc.lua index ae145bf..2910233 100644 --- a/rc.lua +++ b/rc.lua @@ -52,14 +52,6 @@ local layouts = } -- }}} --- {{{ Tags -local wsp = workspace.Workspace:new(layouts) -for s in screen do - wsp:add_desktop(s.index, "Desktop " .. s.index, 10) - wsp:view(s, s.index, 1) -end --- }}} - -- Menubar configuration menubar.utils.terminal = terminal -- Set the terminal for applications that require it -- }}} @@ -72,7 +64,11 @@ mytextclock = wibox.widget.textclock() mywibox = {} mypromptbox = {} +local wsp = workspace.Workspace:new(layouts) + for s in screen do + wsp:view(s, s.index, 1) + -- Create a promptbox for each screen mypromptbox[s] = awful.widget.prompt() @@ -86,7 +82,7 @@ for s in screen do -- Create a tasklist widget local pgr = pager.Pager:new(s, 128, 800) - pgr:set_desktop(wsp.desktops[1]) + pgr:set_desktop(wsp.desktops[s.index]) wsp.signals:connect_signal("desktop:view", function(signals, view_screen, desktop) -- cgit v1.2.3