5

I use devilspie to arrange the windows of monitoring tools (htop,ifop,iotop,nethogs, bmon) at the third workspace.

In case I need the details about some process activity, I switch to the third workspace and watch all I need immediately. It is very handful to me. But these tools consume resources of my week ATOM box which I want to be free when I don't use the third desktop.

That is why I'm looking for a way to stop (kill -STOP) these monitoring processes when I move from the third desktop and coninue them (kill -CONT) when I come back. I figure out there might be a kind of hooks in DE which trigger when desktops switch.

I use LXDE in Lucid. Any Ideas?

zuba
  • 2,393

1 Answers1

2

I would suggest looking for a D-Bus signal that is emitted whenever you switch workspaces.

Try to run dbus-monitor to check which signals are emitted while you do that. See also this question about how to read the dbus-monitor output.

There are Python bindings for D-Bus which you can use to write a script that closes existing windows when this signal is emitted. You can kill a process using Python's os.kill function.

jozilla
  • 61
  • Thank you for that idea.I checked it out and found that no event is generated when workspace changed. Seems like LXDE does not support dbus. – zuba Mar 30 '12 at 12:39