我想在 i3wm 中以浮动模式启动keepassX。我的.config/i3/config
包含行
for_window [class="keepassx"] floating enable
和 xprop
xprop
_NET_WM_USER_TIME(CARDINAL) = 7578932
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 29360143
_NET_WM_ICON(CARDINAL) = Icon (64 x 64):
XdndAware(ATOM) = BITMAP
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
_NET_WM_NAME(UTF8_STRING) = "myKeys.kdbx - KeePassX"
WM_CLIENT_LEADER(WINDOW): window id # 0x1c00005
_NET_WM_PID(CARDINAL) = 26787
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_NAME(STRING) = "Keys.kdbx - KeePassX"
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLASS(STRING) = "keepassx", "Keepassx"
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x1c0000b
window id # of group leader: 0x1c00005
WM_NORMAL_HINTS(WM_SIZE_HINTS):
user specified location: 960, 22
program specified location: 960, 22
user specified size: 956 by 1033
program specified size: 956 by 1033
program specified minimum size: 640 by 517
window gravity: NorthWest
WM_CLIENT_MACHINE(STRING) = "nautilus"
WM_COMMAND(STRING) = { "keepassx" }
我也尝试过命令
for_window [instance="keepassx"] floating enable
如何使 keepassX 始终处于浮动模式?
答案1
正如 Adaephon 所说,你只是看错了字符串。其他一切都应该没问题。
您想按类别进行区分,所以让我们看看您的 xprop:
WM_CLASS(STRING) = "keepassx", "Keepassx"
该行定义如下:
WM_CLASS(STRING) = instance, class
正如你所看到的,你想要 float keepassx
,但是类是Keepassx
有两种解决方案适合您:
使用
for_window [class="Keepassx"] floating enable
,因为它指的是正确的类名称。使用
for_window [class="(?i)keepassx"] floating enable
,这意味着搜索的字符串将是大小写-联合国敏感的。
请记住,您还可以for_window
与其他属性一起使用,例如name
、instance
等。
编辑:我再次阅读了他的评论,是的,他应该是对的:再次查看您的配置以删除该内容后该行中,另一行可能会禁用特定或每个窗口的浮动模式。