Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

focus-exclude WM_PROTOCOLS containing WM_TAKE_FOCUS #560

Closed
OJFord opened this issue Dec 8, 2020 · 2 comments
Closed

focus-exclude WM_PROTOCOLS containing WM_TAKE_FOCUS #560

OJFord opened this issue Dec 8, 2020 · 2 comments

Comments

@OJFord
Copy link

OJFord commented Dec 8, 2020

picom version

vgit-dac85

Configuration:

backend = "xrender"

focus-exclude = [
    "class_g = 'firefox'",
]

inactive-opacity = 0.7

shadow = false

wintypes: {
  dock = {
    shadow = true
  }
  popup_menu = {
    shadow = true
  }
  tooltip = {
    shadow = true
  }
  utility = {
    shadow = true
  }
}

Other details

Some floating windows take my inactive-opacity undesirably; having just checked one I think focus-excludeing windows with WM_TAKE_FOCUS in WM_PROTOCOLS would help.

Is there a documented mapping between the WM_* values I can find with xprop and what needs to be in picom.conf? For example WM_CLASS = <a>, <b> -> class_g (& something else).

Or perhaps they can be used directly, since a couple are in the sample config? But then given it's a list how can we match on any that contains a given element (WM_TAKE_FOCUS)? I gather maybe it's something to do with the @:c or *= used in the sample config, but I can't find any reference to what they mean to libconfig.

@tryone144
Copy link
Collaborator

focus-exclude = [
    "WM_PROTOCOLS@[0]:a *= 'WM_TAKE_FOCUS'",
    "WM_PROTOCOLS@[1]:a *= 'WM_TAKE_FOCUS'",
    "WM_PROTOCOLS@[2]:a *= 'WM_TAKE_FOCUS'",
    "WM_PROTOCOLS@[3]:a *= 'WM_TAKE_FOCUS'",
];

should do the trick for a WM_TAKE_FOCUS based rule. These are documented in the FORMAT OF CONDITIONS section of the manpage.

The duplicates are currently nedded because the rules only check a single value of the WM_PROTOCOLS array. This should be fixed in the future by #550.

@OJFord
Copy link
Author

OJFord commented Dec 8, 2020

Many thanks!

@OJFord OJFord closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants