diff options
-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() |