使用 pycharm 时,“提交”或“推送”的浮动窗口会在屏幕外产生一点,因此我必须手动将它们居中。我试图用指令自动将它们居中for_window;但是,我无法匹配窗户。这是我尝试过的配置:
# These don't work
for_window [window_type="DIALOG"] move position center
for_window [floating] move position center
for_window [window_type="dialog"] move position center
for_window [name="Commit Changes"] move position center
# This works
bindsym $mod+c move position center
另外,相关输出xprop:
_NET_WM_DESKTOP(CARDINAL) = 3
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
I3_FLOATING_WINDOW(CARDINAL) = 1
_NET_WM_USER_TIME(CARDINAL) = 5048004
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS
WM_CLASS(STRING) = "jetbrains-pycharm", "jetbrains-pycharm"
WM_CLIENT_LEADER(WINDOW): window id # 0x2c00008
_NET_WM_ICON_NAME(UTF8_STRING) = "Commit Changes"
WM_ICON_NAME(STRING) = "Commit Changes"
_NET_WM_NAME(UTF8_STRING) = "Commit Changes"
WM_NAME(STRING) = "Commit Changes"
更新:
根据提示红迪特,我将 i3 更新到版本 4.19.1-non-git。尽管如此,浮动窗口仍然没有居中生成。但是,当我重新启动 i3 (bindsym $mod+Shift+r restart) 时,窗口居中。