xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
589 stars 274 forks source link

XMonad.Prompt xprop #526

Closed ceigh closed 3 years ago

ceigh commented 3 years ago

Problem Description

I recently started using xmonad prompt, and I also use picom as a composite manager. So, using picom, I set shadows for windows, but on xmonad prompt, I would like to remove the shadow, usually this is done by adding the window class to the list in picom.

But when I try to get information about the prompt window (as usual with xprop), xprop returns an empty result. If someone has encountered a similar problem, please tell me how to define prompt in picom. Thanks.

Configuration File

xmonad picom

Checklist

geekosaur commented 3 years ago

I don't think the prompt window currently gets any identifying information; ideally it should at least have a valid WM_CLASS assigned (XMonad,xmonad-prompt or similar) so things like this will work.

geekosaur commented 3 years ago

Since it's unusual for windows to not have WM_CLASS, you may be able to match the window with !WM_CLASS:8s. This might also match other windows, but it seems unlikely. (Normally the pattern would have an @, but xmonad is non-reparenting so there should be no distinction.)

ceigh commented 3 years ago

Yes, thanks it works! According to this guide, I used "!WM_CLASS:s":

shadow-exclude = [
  "!WM_CLASS:s"
];
geekosaur commented 3 years ago

I'm going to leave this open because we should really have a proper WM_CLASS on the window.

ceigh commented 3 years ago

Yes, I think this is correct, thank you again.

geekosaur commented 3 years ago

I also think I reversed the resource and class names above, whoops.

slotThe commented 3 years ago

Seems like xSetClassHint is not implemented by X11, so that would probably have to be done first.

slotThe commented 3 years ago

The necessary functionality is now implemented by xmonad/X11/pull/76; but that's not released quite yet.

It would also require us to up the lower bound on X11 to that newly released version (1.10, I think?), but I don't think that's a problem, as xmonad/xmonad/pull/273 and xmonad/xmonad/pull/274 are also based on 1.10.

liskin commented 3 years ago

Fixed by https://github.com/xmonad/xmonad-contrib/pull/546