1

I would like to change a tag assign to one screen and move it to the other screen with the clients inside it. following the api https://awesome.naquadah.org/doc/api/modules/awful.tag.html I see that I can move a tag, but it seems that it has to stay in the same screen... The only wait I see how to do it:

  1. create a new tag with the same name in the other screen
  2. move the clients in that new tag
  3. delete the old tag in the current monitor
  4. switch focus ...
    but this seems like a horrible solution... any workaround?
kokito
  • 1,114
  • 1
  • 13
  • 19

2 Answers2

1

Starting from awesome v3.5, the API you linked to has been extended with the awful.tag.setscreen() function, which can be used to move a tag with all clients to another screen.

The wiki lists modules which can be used to easily share and move tags between all screens. If you would rather implement your own function, I would suggest looking at the sharedtags.movetag() function, where I've solved or worked around a few problems with moving tags to another screen.

Drauthius
  • 11
  • 2
0

https://awesome.naquadah.org/doc/api/modules/awful.client.html#movetoscreen will move a window to screen. The next step would be is to get all clients in specific tag. This you can do like that https://awesome.naquadah.org/doc/api/modules/tag.html#clients.

So, to sum up, it should look like this:

function move_tag_to_screen(tag,screen) 
  local clients = tag.clients()
  for client in clients do 
    client.movetoscreen(screen)
  end
end

Handn't tied it though.

Deleting and creating tags should be trivial at this point.

This is how to move client to a different tag https://awesome.naquadah.org/doc/api/modules/awful.client.html#movetotag

Ben
  • 3,989
  • 9
  • 48
  • 84
  • Hi thanks for the answer, I'm having trouble deleting a tag, what are the condition for a tag to be removable? https://awesome.naquadah.org/doc/api/modules/awful.tag.html#delete from this I see that I have to empty the tag, which I do but the tag doesn't get deleted, otherwise, everything works – kokito Jul 09 '15 at 13:33