3 ms·
I made a similar thing that's done using KDE's focus signals, forwarded from kwin over dbus. The benefits of using kwin's signals are that it potentially works
by rhn_mk1 5y ago
I made a similar thing that's done using KDE's focus signals, forwarded from kwin over dbus.
The benefits of using kwin's signals are that it potentially works also on Wayland. The downside is that it only works on KDE.
I used it to stop Firefox instances that I wasn't using. The quirks are real though, and the clipboard hangup + a remote SSH client combo occasionally made the X session completely unresponsive due to reasons I don't quite remember. The solution was to kill the remote X connection. Another nasty quirk is that switching away from a Jitsi session and back in made the session completely irrecoverable with about 50% chance. Not even a browser restart could help – the sound was permanently gone.
I would not recommend this solution for the faint hearted, except maybe in the milder version where the processes get limited access to CPU using cgroups - but not zero, so that they can't choke and take down other parts of the system.
Nowadays Firefox improved its CPU usage a little, so I'm not using the program, but I might need to come back to it again.