Hi,

I have a function to move clients one tag left and right:

-- Moves client one tag left
awful.key({ "Control", "Mod1", "Shift"   }, "Left",
  function (c)
    local curidx = awful.tag.getidx(c:tags()[1])
    if curidx == 1 then
      c:tags({screen[mouse.screen]:tags()[9]})
    else
      c:tags({screen[mouse.screen]:tags()[curidx - 1]})
    end
    awful.tag.viewprev() -- switch to tag
  end)

As you can see the number of tags is hard-coded. I'd like to improve
this function. What would be a more flexible variant of the 
c:tags({screen[mouse.screen]:tags()[9]}) call which replaces the “9”
with something generic?


Marco



--
To unsubscribe, send mail to [email protected].

Reply via email to