Discover
Discover copied to clipboard
Add setting to only show overlay when in a whitelisted active window
...or maybe have a window whitelist - the overlay is pretty distracting when in a (e.g.) browser window and not in a game.
I'd PR this but I'm not too sure how this would be implemented as I don't know Python or low-level X.org/Wayland API's.
I have no idea how you'd do this in X and know for certain this isn't possible in wayland.
The only way I can see this working is to automatically start and stop the overlay based on game launching. Something like https://github.com/FeralInteractive/gamemode might be able to accommodate us so that it only runs overlay when needed
Hmm, I guess the window class whitelist is the next best thing then. I checked with xprop -root | grep NET_ACTIVE_WINDOW
and this is definitely possible on X.org. (seems pretty basic so I'd guess a similar thing works on Wayland too but I don't have Wayland setup to test or any idea of what docs I'd read)
You can always use WM_NAME
aka window title if window role or class is not available / too generic.
Don't know if this helps. But you could check if a window is in fullscreen with this method:
def is_window_fullscreen():
display = Xlib.display.Display()
root = display.screen().root
active_window_id = root.get_full_property(
display.intern_atom('_NET_ACTIVE_WINDOW'),
Xlib.X.AnyPropertyType
).value[0]
active_window = display.create_resource_object('window', active_window_id)
state_property = active_window.get_full_property(
display.intern_atom('_NET_WM_STATE'),
Xlib.Xatom.ATOM
)
if state_property:
state_atoms = [display.get_atom_name(x) for x in state_property.value]
if '_NET_WM_STATE_FULLSCREEN' in state_atoms:
return True
return False```
I'm not still interested, can close unless someone else wants this.