You are not logged in.

#1 2018-03-10 21:12:36

fledermann
Member
From: Bielefeld, Germany
Registered: 2013-06-24
Posts: 49

Suspend resource-hungry applications when not on current workspace

This python script will run in the background and suspends specified applications when they are not on the active workspace.
I had this idea because both Firefox and Chromium annoyed me on my notebook, demanding CPU time just by being there and doing nothing. The script works pretty well for me, and hopefully it can extend the battery life a bit.

python2 and python2-gobject is required. Stopping the script shouldn't be an issue, you can kill it with CTRL-C or SIGTERM or whatever.

I would have put it on github, but I'm a shitty programmer and don't know anything about git.

https://pastebin.com/KTzZPVN0

Offline

#2 2018-03-28 11:21:23

svnset
Member
Registered: 2016-07-31
Posts: 75

Re: Suspend resource-hungry applications when not on current workspace

I think it's a nice idea for notebooks. But why python2? big_smile


After one has played a vast quantity of notes and more notes,
it is simplicity that emerges as the crowning reward of art. - Chopin

Offline

#3 2018-03-28 16:40:21

fledermann
Member
From: Bielefeld, Germany
Registered: 2013-06-24
Posts: 49

Re: Suspend resource-hungry applications when not on current workspace

svnset wrote:

I think it's a nice idea for notebooks. But why python2? big_smile

Because I couldn't get wnck3 with gobject-introspection for python3 working. I tried for several hours and just gave up.

Offline

#4 2018-03-30 21:28:12

svnset
Member
Registered: 2016-07-31
Posts: 75

Re: Suspend resource-hungry applications when not on current workspace

Hmm what exactly caused problems? In fact your script has no specific python2 code and works for me just fine with python3 tongue

I guess you know this api already.


After one has played a vast quantity of notes and more notes,
it is simplicity that emerges as the crowning reward of art. - Chopin

Offline

Board footer

Powered by FluxBB