[i3-discuss] Re: SIGSTOP a process when unfocused

  • From: Derek Potts <derek@xxxxxxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Fri, 12 Feb 2016 13:37:05 -0600

This is perfect. Thank you!

On Fri, Feb 12, 2016 at 12:56 PM, Dmytro Samoilenko <smola@xxxxxxx> wrote:

Check this out
https://github.com/acrisci/i3ipc-python/blob/master/examples/stop-application-on-unfocus.py


On 12.02.16 20:52, Derek Potts wrote:

I would like to send a SIGSTOP to a particular process when its window
looses focus. My scenario is that I run a cpu-intensive process that does
not need to be active when I am not looking at it. It is rather expensive
to startup, so SIGSTOP and SIGCONT turn out to be a good solution. I always
run it on a predictable workspace, so I have bound a key to send it a
SIGCONT and and switch to that workspace. That works very well for popping
over to it to take a look at it. What I would like to accomplish is to send
it a SIGSTOP anytime that I move away from it. I don't run any other
processes in that workspace, so it would work equally well to SIGSTOP it
when I move away from that particular workspace. Can this be accomplished?




Other related posts: