窗口的QTile设置位置
我的问题是,我想在屏幕上(浮动窗口)在屏幕上的特定X和y位置有一个特定的WM_Class产卵。
我阅读了文档,但无法找到一种方法。 我试图使用该方法:
set_position_floating()
My problem is that I want to have a specific wm_class spawn at a specific X and Y position on my screen every time it opens (Floating window).
I read the documentation, but couldn't figure out a way.
I was trying to use the method:
set_position_floating()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我设法以qtile做到这一点,就像我在DWM中这样做的方式一样。我将NCMPCPP放置在屏幕上,通过执行以下操作。 NCMPCPP在终端中运行,我的终端为“ ST”。因此,我将此键绑定在我的配置中放在Spawn NCMPCPP中:
我相信“ C”标志允许您为新的WM_CLASS选择一个名称。我选择了“ float-term”作为班级名称。 “ G”标志使您可以设置所需的几何形状。然后,我在我的config.py中的float_rules列表中添加了新的WM_CLASS名称:
此方法使我可以在屏幕上催生任何位置。除了运行NCMPCPP的ST之外,我还没有尝试过任何其他程序,但是我敢肯定它会起作用。
I managed to do this in qtile the same way I did it in dwm. I placed ncmpcpp where I wanted on the screen by doing the following. Ncmpcpp runs in the terminal and my terminal is 'st'. So, I put this key binding in my config to spawn ncmpcpp:
I believe the 'c' flag allows you to choose a name for a new wm_class. I chose 'float-term' as the class name. The 'g' flag allows you to set the geometry that you want. Then, I added the new wm_class name to the float_rules list in my config.py:
This method allowed me to spawn st any place on the screen. I have not tried this with any program other than st running ncmpcpp yet, but I'm pretty sure it would work.
设置位置:
防止重新定位 no_reposition_rules :
Set position:
prevent reposition to center by no_reposition_rules: