I use archlinux and compton.

I read this in the wiki:

Exclude all windows with no name from compton using the following options:

$ compton <other arguments> --focus-exclude "! name~="

But this does not work. It gives me that error message:

Pattern "! name~=" pos 8: Invalid pattern type.

I use two programs I want on the exclude list. One is 'dmenu' and one 'i3lock' and want to exclude it. I executed xwininfo to get the id:

xwininfo: Window id: 0x3e00003 "i3lock"

  Absolute upper-left X:  0
  Absolute upper-left Y:  0
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 3840
  Height: 1080
  Depth: 24
  Visual: 0x23
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x20 (installed)
  Bit Gravity State: ForgetGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: yes
  Corners:  +0+0  -0+0  -0-0  +0-0
  -geometry 3840x1080+0+0

Unfortunately the id changes so I can't use it. And using "class_g = 'i3lock'", doesn't work either.

any ideas?

I also tried the other example about dmenu in the archwiki, but this doesn't work for me either. But nevertheless i3lock is even more important to me.

Thank you.


You have to use xprop -id 0x3e00003 to get all atoms of that window. For dmenu it will be:

WM_CLASS(STRING) = "dmenu", "Dmenu"

The following CONDITION matches this atom:

"class_g *?= 'dmenu'"

You can use multiple conditions:

"class_g *?= 'dmenu' && class_g *?= 'i3lock'"

However I didn't find the wm class or any other atom of i3lock. It seems that i3lock doesn't get a windowid. So I would suggest to write a little wrapper script around i3lock:

killall compton
i3lock -n <other arguments>
compton -b <other arguments>
  • What does this wrapper script? – linuxNewbie Mar 30 '17 at 7:21
  • If you run the wrapper script instead of i3lock, it will stop compton, run i3lock and start compton again after you unlock your screen. Since i3lock is not a managed window, ewmh tools do not work. compton uses ewmh (atoms) to find informations about windows. – ctx Mar 30 '17 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.