1

I found:

but I wonder how to detect which xwindow applications are in background and cpulimit them? Any hint?

That would be useful especially for limiting CPU usage for web browsers that are in background.


My quick and dirty solution: https://gist.github.com/dmgr/08f9dc89095eab4c74b5

Community
  • 1
  • 1
Dawid Grzesiak
  • 402
  • 4
  • 9

1 Answers1

0

As described here: https://stackoverflow.com/a/2042371/2838914

You can't get directly get the Pid from the window id, I have to go the other way around, by mapping the windows id and pid together.

Community
  • 1
  • 1
izissise
  • 898
  • 1
  • 7
  • 23