diff --git a/rc.lua b/rc.lua index 4ed8868..2ea7f70 100644 --- a/rc.lua +++ b/rc.lua @@ -202,26 +202,16 @@ awful.screen.connect_for_each_screen(function(s) -- Each screen has its own tag table. local tags = {} - if screen:count() > 1 then - if s.geometry.width > s.geometry.height then -- landscape - for i = 1, 2 do - tags[#tags+1] = tostring(workspaceCounter) - workspaceCounter = workspaceCounter + 1 - end - awful.tag(tags, s, awful.layout.suit.floating) - else -- portrait - for i = 1, 4 do - tags[#tags+1] = tostring(workspaceCounter) - workspaceCounter = workspaceCounter + 1 - end - awful.tag(tags, s, awful.layout.suit.fair.horizontal) - end - else - for i = 1, 10 do - tags[#tags+1] = tostring(workspaceCounter) - workspaceCounter = workspaceCounter + 1 - end + for i = 1, math.floor(10 / screen:count()) do + tags[#tags+1] = tostring(workspaceCounter) + workspaceCounter = workspaceCounter + 1 + end + if screen:count() > 1 and s.geometry.width > s.geometry.height then -- landscape, multiple displays + awful.tag(tags, s, awful.layout.suit.floating) + elseif s.geometry.width > s.geometry.height then -- landscape, single display awful.tag(tags, s, awful.layout.suit.fair) + else -- portrait + awful.tag(tags, s, awful.layout.suit.fair.horizontal) end -- Create a promptbox for each screen