LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices

Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Rate this Entry

Possible key mechanism to disable xscreensaver automatically when watching youtube and the like

Posted 05-29-2014 at 08:07 PM by the dsc

I haven't even tried it yet, it just looks like a good candidate method to mess with eventually:

Code:
top p $mplayer_pid -bd 0.25 n 3 | grep $mplayer_pid | awk '{print $9}'
I saw it here:
https://forums.gentoo.org/viewtopic-...4-start-0.html

That would give "larger than zero" numbers when mplayer is playing (I think Debian's/current "top" syntax is a little bit different and requires "b" and "d" separated, or that's the impression that I get).

The same basic principle (using top to infer video playing) probably can be inserted into some daemon-like script with all the appropriate logic to first see which browsers are running and whatnot.

Perhaps even ps could be used, I think it would make things faster/lighter.
Posted in Uncategorized
Views 115 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration