On Sun, Sep 06, 2020 at 08:21:45AM +0200, Tobias Bengfort wrote: > For this to work it would need to be supported in several places: > > - Window managers could set _NET_WM_STATE_HIDDEN > - Terminal emulators and multiplexers could set the terminal size to 0,0 > - Applications need to actually use that information > > The only project I could find that seems to do something like this is > mutter. > > So I am wondering: Is this even worth the effort? Have I missed any > prior art?
This isn't quite the same, but last week, I started work to make dwm send SIGSTOP when application loses focus and SIGCONT once it's active again. My original plan to do something similar involved using an X11-aware proxy, but I realized I could use an LD_PRELOAD shim to ensure every window has _NET_WM_PID set even if an application doesn't set it natively. The library itself is finished. Now all I have to do is modify dwm to send the signals based on focus and support user defined patterns (e.g. window title, window class, etc.) for which the signals are sent. My primary use case is to have games stop consuming CPU resources when I'm not actively playing them. Eric