Skip to content

Commit

Permalink
dynamically generate the taglist.names and taglist.layouts tables bas…
Browse files Browse the repository at this point in the history
…ed on the number of configured tags
  • Loading branch information
TanvirOnGH committed Aug 7, 2024
1 parent ac05a87 commit 168c7b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions color/rosybrown/rc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ taglist.buttons = awful.util.table.join(
)

-- some tag settings which indirectly depends on row and columns number of taglist
--[[
taglist.names = {
"1:1",
"1:2",
Expand Down Expand Up @@ -111,6 +112,15 @@ taglist.layouts = {
al[8],
al[14],
}
]]

-- Dynamically generate the taglist.names and taglist.layouts tables based on the number of configured tags
taglist.names = {}
taglist.layouts = {}
for i = 1, taglist.rows_num * taglist.cols_num do
taglist.names[i] = tostring(i) .. ":" .. tostring((i - 1) % taglist.cols_num + 1)
taglist.layouts[i] = awful.layout.layouts[i % #awful.layout.layouts + 1]
end

-- Tasklist
local tasklist = {}
Expand Down

0 comments on commit 168c7b1

Please sign in to comment.