Hi, I would like to make a function that suspends the corresponding process when I iconify a window and unsuspends it when I uniconify the window.
Particularly, I want to (un-)suspend seamonkey with this (because it uses ridiculous amounts of CPU time and memory the latter of which might be swapped out more easily when the process is suspended than when it is not). The kill command works nicely for it, i. e. 'kill -STOP <PID of process>' and 'kill -CONT <PID of process>' work fine. I googled for a solution and found some suggestions as to obtain the process ID, yet none of them seemed to work. Since seamonkey is usually started through fvwm with a starter function, I might be able to obtain the PID when starting it and use that. However, this approach would be somewhat limited. What might be the best way to make a general function to suspend and unsuspend processes when their windows are iconified and uniconified, respectively? -- Knowledge is volatile and fluid. Software is power.