diff options
author | Tom Willemse | 2014-08-21 20:19:31 +0200 |
---|---|---|
committer | Tom Willemse | 2014-08-21 20:19:31 +0200 |
commit | 521f28dc3631c283fc1e99c4c1c5702a867cf4ce (patch) | |
tree | d662147920e11a33ab1ae85047c317a0267305b4 /awesome | |
parent | 7db1ce9b0a760da6ea94c0464f22b878cf3aa0f7 (diff) | |
download | dotfiles-521f28dc3631c283fc1e99c4c1c5702a867cf4ce.tar.gz dotfiles-521f28dc3631c283fc1e99c4c1c5702a867cf4ce.zip |
Only show current layout if there are multiple
Diffstat (limited to 'awesome')
-rw-r--r-- | awesome/.config/awesome/rc.lua | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 29a4053..476438c 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -217,14 +217,17 @@ mymaillisttimer:start() for s = 1, screen.count() 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))) + + if #layouts > 1 then + -- 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))) + end -- Create a taglist widget 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()) end 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) local layout = wibox.layout.align.horizontal() |