'How to get the history index of a client in a tag

How do I get the client history order?

I have a table with all my clients

local clientsInTag = { [1]=client1, [2]=client2, [3]=client3 }

I want to focus it according to the history

awful.focus = clientsInTag[historyIndex]

Also how does the history index change when adding multiple tags with awful.tag.viewtoggle(tag)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source