awesome-wm:将 float 客户端移动到屏幕中心

标签 awesome-wm

在 Awesome WM 中,有没有一种方法可以绑定(bind)组合键以将聚焦的 float 客户端移动到屏幕中央? (客户端既不能最大化也不能全屏)

我正在查看文档,但显然没有这样的功能。

因此,作为替代方案,我正在考虑获取当前屏幕的宽度和高度,然后相应地设置客户端的 x 和 y 属性(还要考虑客户端本身的宽度和高度)。

我想知道是否有更简单的方法来执行相同的操作。

最佳答案

为了补充 Worron 的答案,您需要使用 Placement API

https://awesomewm.org/apidoc/libraries/awful.placement.html

clientkeys 表中添加键绑定(bind)。它看起来像:

awful.key({ modkey, "Shift"   }, "y", awful.placement.centered),

关于awesome-wm:将 float 客户端移动到屏幕中心,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42023399/

相关文章:

lua - 真棒 WM : Placing tiled clients in specific order on startup

window-management - 如何在磁贴布局中使用箭头键在 Awesome WM 中导航打开的程序?

lua - 带有长消息的顽皮通知

ubuntu - 真棒 : change notifications

lua - 很棒的 wm 中的 cpu 温度小部件

linux - 如何获取awesome-wm的PID