Hiding mouse cursor

24 views
Skip to first unread message

blubbalub

unread,
Feb 15, 2011, 11:20:27 AM2/15/11
to Caffeine For Linux
Hey guys,

thank you for your wonderful little tool.
I've tried to script my way around using shortcuts or using gnome's
power-managment-applet.
But the results weren't satisfying as yours =)

So here's my little addendum
I'm trying to hide my cursor during the active time of caffeine via
"unclutter -idle 1"
I do have basic knowledge of programming via c++, but am by no means
an expert.
So I picked up the core.py lines 568ff

def _toggleDPMS(self):
"""Toggle the DPMS powersaving subsystem."""
if self.sleepIsPrevented:
commands.getoutput("xset +dpms")
commands.getoutput("xset s on")
commands.getoutput("killall
unclutter") and added this line
else:
commands.getoutput("xset -dpms")
commands.getoutput("xset s off")
commands.getoutput("unclutter -idle
1") as well as this one

Surprisingly it did hide my cursor, but does not kill the processes of
unclutter after reinvoking DPMS or screensaver.
Any hints or suggestions, what I'm doing wrong?

Thank you very much

André

blubbalub

unread,
Feb 15, 2011, 12:51:10 PM2/15/11
to Caffeine For Linux
Never mind, fixed the issue by adding "&" to the last line
>
>     def _toggleDPMS(self):
>         """Toggle the DPMS powersaving subsystem."""
>         if self.sleepIsPrevented:
>             commands.getoutput("xset +dpms")
>             commands.getoutput("xset s on")
>             commands.getoutput("killall unclutter")
>         else:
>             commands.getoutput("xset -dpms")
>             commands.getoutput("xset s off")
>             commands.getoutput("unclutter -idle 1 &")

yeah i know quick and dirty, but i don't know how to do it right
Reply all
Reply to author
Forward
0 new messages