Simultaneously switch tags as one screen in multi monitor setup in 3.5?

The answer propsed in Simultaneously switch tags as one screen in multi monitor setup

is not working in awesome 3.5. Any solutions?

Since I' m new to awesome and lua, I don' t know how to do it myself. And I have no right to comment on the anwser. Sorry for restarting a question.


Solution 1:

awful.key({ modkey, "Control"   }, "Left", 
function()
    for i = 1, screen.count() do
        awful.tag.viewprev(i)
    end
end ),

awful.key({ modkey, "Control"   }, "Right", 
function()
    for i = 1, screen.count() do
        awful.tag.viewnext(i)
    end
end ),

Found on the original post for 3.5.

Solution 2:

For completeness here's the change for the 1..9 keys:

awful.key({ modkey }, "#" .. i + 9,
    function ()
        for screen = 1, screen.count() do
            local tag = awful.tag.gettags(screen)[i]
            if tag then
                awful.tag.viewonly(tag)
            end
        end
    end
),

And to handle the click on the taglist:

mytaglist.buttons = awful.util.table.join(
  awful.button({ }, 1, function(tag)
    local i = awful.tag.getidx(tag)
    for screen = 1, screen.count() do
        local tag = awful.tag.gettags(screen)[i]
        if tag then
           awful.tag.viewonly(tag)
        end
    end
  end),
[...]