简体   繁体   English

很棒的WM如何更改屏幕标签

[英]awesome WM how to change tag of screen

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: 在api https://awesome.naquadah.org/doc/api/modules/awful.tag.html之后,我看到我可以移动标签,但似乎它必须留在同一屏幕上...唯一等一下,我看看该怎么做:

  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? 但这似乎是一个可怕的解决方案...任何解决方法?

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. 从令人敬畏的v3.5开始,链接到的API已使用awful.tag.setscreen()函数进行了扩展,该函数可用于将所有客户端的标签移至另一个屏幕。

The wiki lists modules which can be used to easily share and move tags between all screens. Wiki列出了可用于轻松在所有屏幕之间共享和移动标签的模块。 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. 如果您想实现自己的功能,建议您查看一下sharedtags.movetag()函数,在该函数中,我已经解决或解决了将标签移动到另一个屏幕的一些问题。

https://awesome.naquadah.org/doc/api/modules/awful.client.html#movetoscreen will move a window to screen. https://awesome.naquadah.org/doc/api/modules/awful.client.html#movetoscreen会将窗口移到屏幕上。 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 . 您可以这样做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 这是将客户端移动到其他标签的方法https://awesome.naquadah.org/doc/api/modules/awful.client.html#movetotag

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM