Disable KDE4 screensaver while watching a movie
My KDE screen saver is set for 15 minutes and this bash script is in my Autostart for KDE4.
It simulates user activity every 10 minutes vice disable/enable the screensaver. It uses a single line of program names separated by spaces. Enjoy. ;) Code:
#!/bin/bash |
Nice script!
But I'm replying on the subject of the copyrights. I've done a similar set of scripts (with the help of äxl) and posted it here: http://www.linuxquestions.org/questi...ns-4175468270/ (current scripts at post #5). They're meant to be used with XFCE, not KDE and intended to prevent the computer from suspending (not blanking the screen, for my purposes kepping the screensaver active is actually a good thing). But the rational is basically the same as for your script. I can still work a lot on it and one thing I was thinking about is the way it checks for active programs that should prevent the computer from suspending. I'm doing it through an "if ( pgrep -l program1 ) || ( pgrep -l program2 ) || ..." condition but your way seems much more efficient. So my question is: can I just take that part of your script (the "programs="prog1 prog2" + modified "for" loop) and add a modified "copyright" notice after what I currently have, such as (proposed addition in bold): Code:
# Script suggested by user "äxl" at LinuxQuestions.org in reply to a question of mine (JDAckle): Jean D. Ackle |
Quote:
|
Thank you!
Will be glad to make the mention! ;) EDIT: Done! |
v1.1 10/31/13 - added "--sort -pcpu" to make the search quicker.
Code:
#!/bin/bash |
All times are GMT -5. The time now is 06:31 PM. |