My pseudo Presentation Mode

Israel israeldahl at gmail.com
Sat Dec 20 16:28:19 UTC 2014


On 12/20/2014 04:47 AM, Nio Wiklund wrote:
> 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
>
Hi All,
I am sure you could also add this to a tray icon, using sdesk.
sdesk is a GTK2 tray icon program that you can link scripts to. 
Basically you set a right click and left click action to run, it can be
any sort of executable.
if anyone is interested I will link a PPA you can use.
but usage is pretty simple you run
sdesk -t /path/to/icon/you/want.svg "Tooltip Text to display on mouse
over" "leftclickexecutable" "rightclickexecutable"

I haven't tested this yet in Lubuntu only using JWM, but since Lubuntu
(and Xubuntu) are GTK2 this should work.  It does NOT work in gtk3 DE AFAIK.

This could be a very useful thing for Lubuntites  (until LXQt of course).
Of course I suppose the program could be rewritten to use Qt rather than
GTK2....

I mainly use it so invoke a zenity dialog for locate to have a nice
quick search in my panel in JWM.

-- 
Regards




More information about the Lubuntu-users mailing list