diff options
author | Anton Khirnov <anton@khirnov.net> | 2018-07-03 12:04:04 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2018-07-03 12:04:04 +0200 |
commit | b23c940c7e16481272baa4dbbd2fc8f75768f646 (patch) | |
tree | e9bc9cf7889ffe744ec34e9bc015db5f1cb4fa33 /rc.lua | |
parent | b01932a4468c983ac886f84c510cf092b093aa4d (diff) |
rc: remove an unnecessary global layout widget table
Diffstat (limited to 'rc.lua')
-rw-r--r-- | rc.lua | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -72,21 +72,20 @@ mytextclock = wibox.widget.textclock() -- Create a wibox for each screen and add it mywibox = {} mypromptbox = {} -mylayoutbox = {} mytasklist = {} for s in screen do -- Create a promptbox for each screen mypromptbox[s] = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. - -- We need one layoutbox per screen. - mylayoutbox[s] = awful.widget.layoutbox(s) - mylayoutbox[s]:buttons(awful.util.table.join( - awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), - awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) + local layoutbox = awful.widget.layoutbox(s) + layoutbox:buttons(awful.util.table.join( + awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), + awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), + awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) -- Create a tasklist widget local pgr = pager.Pager:new(s, 128, 800) @@ -109,7 +108,7 @@ for s in screen do local right_layout = wibox.layout.fixed.vertical() if s.index == 1 then right_layout:add(wibox.widget.systray()) end right_layout:add(mytextclock) - right_layout:add(mylayoutbox[s]) + right_layout:add(layoutbox) -- Now bring it all together (with the tasklist in the middle) local layout = wibox.layout.align.vertical() |