2

I want to start keepassX in floating mode in i3wm. my .config/i3/config contains the line

 for_window [class="keepassx"] floating enable

and the 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" }

I also tried the command

  for_window [instance="keepassx"] floating enable

how can I make the keepassX always stars in floating mode?

2
  • Your class criterion does not work because i3 does case-sensitive matches. and the first value of WM_CLASS is actually the instance, while the second value is the class. That means that the second attempt with instance instead of class should work and actually does so on my Arch+i3 installation. Could there be other for_window rules that actively disable floating mode in your configuration?
    – Adaephon
    Commented Feb 5, 2017 at 22:06
  • If it doesn't solve your problem, you may consider posting your i3wm config. (per pastebin or something alike)
    – Trollwut
    Commented Feb 7, 2017 at 9:11

1 Answer 1

1

As Adaephon said, you just looked at the wrong string. Everything else should be fine.

You want to distinct by class, so let's look at your xprop:

WM_CLASS(STRING) = "keepassx", "Keepassx"

This line is defined like:

WM_CLASS(STRING) = instance, class

As you see, you wanted to float keepassx, but the class is Keepassx

There are two solutions for you:

  1. Use for_window [class="Keepassx"] floating enable, as this refers to the right class name.

  2. Use for_window [class="(?i)keepassx"] floating enable, which means that the searched string will be case-unsensitive.

Bear in mind, that you can also use for_window with other attributes, like name, instance, etc.

EDIT: I've read his comment again and yes, he should be right: Look again at your config to strike out that after that line, another one comes that may disable floating mode for specific or every windows.

2
  • Thanks you so much. I tried both. your first suggestion and the hint from @Adaephon. Suddenly it worked it might be that I used the wrong key combination to restart i3. Sorry
    – A.Dumas
    Commented Feb 9, 2017 at 11:33
  • Don't worry. I use i3 now for about a month and write new stuff into my config every few days and still make these mistakes. :-)
    – Trollwut
    Commented Feb 9, 2017 at 12:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .