4

I've been digging around in the API documentation, and I'm having limited sucess switching tags from within awesome-client. Basically, I can switch tags with:

awful.tag.viewidx(2)

But that is relative not absolute. From looking in my rc.lua, looks like what I need is:

local screen = mouse.screen
awful.tag.viewonly(tags[screen][2])

But I get the following error instead:

attempt to index field '?' (a nil value)

What is the most concise way of changing tags (preferably one command) to an absolute tag number. Alternatively, how can I find the current tag?

1 Answer 1

0

After a lot of trial and error this is what I came up with:

awful.tag.viewonly(tags[1][3])

This will switch to the third tag.

2
  • Only on the first screen, even if the focus is on the second screen. Commented Jun 25, 2013 at 8:38
  • The first argument to tags is the screen number. Commented Jul 19, 2015 at 21:53

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.