1

I'm trying to configure i3 so that xzoom is always launched in floating mode.

The problem is that xzoom's window does not have a WM_CLASS and its WM_NAME is not set at window creation, but after a small delay.

Here is what the properties look like for the first few ms:

$ xzoom & sleep .01; xprop -id 0x2200001
_NET_WM_DESKTOP(CARDINAL) = 0
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_ICON_NAME(STRING) = "xzoom"

As you can see, the only thing that tells it apart is the WM_ICON_NAME. After a few ms the title is added:

$ xprop
WM_NAME(STRING) = "xzoom x4"
_NET_WM_DESKTOP(CARDINAL) = 0
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW
WM_ICON_NAME(STRING) = "xzoom"

If I match the window using WM_NAME, the screen flashes horribly, as the other windows are re-arranged before falling back to their positions:

for_window [title="xzoom*"] floating enable

I tried looking for a command criterion that would look at the WM_ICON_NAME, but I couldn't find any.

Is there an alternative way to start this program in floating mode?

1
  • If you're willing to write a wrapper script, you can wait for the necessary properties to be set. I did a similar thing here.
    – Raphael
    Commented Oct 9, 2018 at 17:21

2 Answers 2

0

I was able to add a WM_CLASS to xzoom by recompiling it with

    XChangeProperty(dpy, win, XA_WM_CLASS, XA_STRING, 8,
                    PropModeReplace,
                    (unsigned char *)progname, strlen(progname));

on the line after where XA_WM_ICON_NAME is set.

Then, for_window [instance="xzoom"] floating enable worked for me in my i3 config!

It's great that this old software still works so well :)

0

Alternatively, you could try adding the following line to i3 config which should correctly match the window title:

for_window [title="^xzoom"] border none; floating enable

That said, it also makes me happy to see that compiling a customization is always an option.

You must log in to answer this question.

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