Only show current layout if there are multiple
This commit is contained in:
parent
7db1ce9b0a
commit
521f28dc36
1 changed files with 12 additions and 9 deletions
|
@ -217,6 +217,8 @@ mymaillisttimer:start()
|
||||||
for s = 1, screen.count() do
|
for s = 1, screen.count() do
|
||||||
-- Create a promptbox for each screen
|
-- Create a promptbox for each screen
|
||||||
mypromptbox[s] = awful.widget.prompt()
|
mypromptbox[s] = awful.widget.prompt()
|
||||||
|
|
||||||
|
if #layouts > 1 then
|
||||||
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
|
||||||
-- We need one layoutbox per screen.
|
-- We need one layoutbox per screen.
|
||||||
mylayoutbox[s] = awful.widget.layoutbox(s)
|
mylayoutbox[s] = awful.widget.layoutbox(s)
|
||||||
|
@ -225,6 +227,7 @@ for s = 1, screen.count() do
|
||||||
awful.button({ }, 3, 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({ }, 4, function () awful.layout.inc(layouts, 1) end),
|
||||||
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
|
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
|
||||||
|
end
|
||||||
-- Create a taglist widget
|
-- Create a taglist widget
|
||||||
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
|
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
|
||||||
|
|
||||||
|
@ -248,7 +251,7 @@ for s = 1, screen.count() do
|
||||||
right_layout:add(wibox.widget.systray())
|
right_layout:add(wibox.widget.systray())
|
||||||
end
|
end
|
||||||
right_layout:add(mytextclock)
|
right_layout:add(mytextclock)
|
||||||
right_layout:add(mylayoutbox[s])
|
if #layouts > 1 then right_layout:add(mylayoutbox[s]) end
|
||||||
|
|
||||||
-- Now bring it all together (with the tasklist in the middle)
|
-- Now bring it all together (with the tasklist in the middle)
|
||||||
local layout = wibox.layout.align.horizontal()
|
local layout = wibox.layout.align.horizontal()
|
||||||
|
|
Loading…
Reference in a new issue