Den 2014-12-20 02:34, Eric Bradshaw skrev: > John Hupp, > > I had no idea that was a bug. I went searching for something to help out > someone > I'd installed Netflix for and got a much shorter script out of it - I > assume because it > uses/relies on xotool. Now, I have no interest in developing this. I > only offer it up > to see if it will help. I include the following paragraph from > usr/share/doc because > I had been planning on including it in our next respin. > > Mouse Mover is a non-copyrighted, community solution to a common > problem; to > keep the Lubuntu/LXDE screen from blanking every 10 min while watching > video. > To use; go to Sound & Video --> Mouse Mover. Works silently in the > background. > This uses xdotool [http://semicomplete.com/projects/xdotool/] by Jordan > Sissel. > vasa1 developed this script to move the mouse if CPU usage exceeds 5%; > which is > what normally happens when watching video via Netflix, or YouTube, etc. > He was > helped by Vaphell on the Ubuntu Forums, terdon on StackExchanhge and > several > others. C4C stumbled across the script over a year later, added an icon, > the > Mouse Mover name and put it in the Menu of the C4C Lubuntu ReSpin. > > First > sudo apt-get install xdotool > > Then create the file > sudo leafpad /usr/bin/batinfo.sh > > Copy and paste the following: > > #!/usr/bin/env bash > > sleep_period=8m > > while true; do > if ps -eo %C --sort -%cpu | head -2 | awk 'NR==2 { exit !($1>10); }'; > then > xdotool key shift > fi > sleep ${sleep_period} > done > > Save. Then open PCManFM as root > gksu pcmanfm > > Navigate to /usr/bin/batinfo.sh, right-click and choose "Properties" > from the drop-down. Click the "Permissions" tab and then choose > "Anyone" from the Execute dropdown. Click the "OK" button. > Copy the "mouse-mover" folder, paste in /usr/share/applications > Before watching Netflix, YouTube videos, etc. > Select Menu --> Sound & Video --> Mouse Mover > Enjoy! > > When asking vasa1 who/how to thank, he sent his modified script that uses > the [Shift] key. > > #!/usr/bin/env bash > > sleep_period=8m > > while true; do > high="$(ps -eo %C --sort -%cpu | awk 'NR==2')" > if ps -eo %C --sort -%cpu | awk 'NR==2 { exit !($1>5); }'; then > xdotool key shift > fi > sleep ${sleep_period} > done > > > Eric
Hi Eric, Thanks for sharing, and kudos to vasa1 :-) Best regards Nio -- Lubuntu-users mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/lubuntu-users
