Hide/Show Mouse Depending on Activity
THE IDEA
On mythbuntu no-desktop setups, run a daemon that hides the cursor when the mouse is idle for a specific amount of time. This would allow the mouse to disappear after a short amount of time, so when switching between applications - perhaps from mythfrontend to xine - the cursor is not visible, but if the user requires the use of a mouse, simply moving it would change the cursor back.
REQUIREMENTS
- Create a daemon to monitor mouse activity by asking Xlib for the cursor coordinates
- Change cursor by using xsetroot to set a blank xbm file to (effectively) hide the mouse
- Making the mouse reappear is difficult, the only option is to reset the cursor to the standard xserver "left_ptr" cursor
THE CODE
Subversion: https:/
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Robert
- Direction:
- Needs approval
- Assignee:
- Robert
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
- Needs Code Review
- Milestone target:
- 8.04-alpha1
- Started by
- laga
- Completed by
- Thomas Mashos
Related branches
Related bugs
Sprints
Whiteboard
GENERAL
The most recent release (https:/
RUNNING
To test functionality (after installing the xmouse module), try running idle-watch with the --pretend options to see what it *would* do with the following command:
./idle-watch --display=:0 --timeout=4 --idle-
This script should be run by the user the display is running on (although any user besides root would work on Ubuntu - but this is not the case with all distributions and setups). It needs to be made sure that if this daemon is run as a different user (such as an idle-watch system user) the proper xhost settings are applied.
FOLDER LAYOUT
- idle-watch: main folder
- idle-watch: contains the main Python script and two configuration files that hold the commands run when the system changes from active to idle or vice versus
- xmouse: contains a C Python module that handles asking Xlib for the mouse coordinates on the root window
- resources: contains the empty image files used to hid the cursor
DEPENDENCIES
See https:/
TESTING
- Make sure all dependencies are installed. Since we're compiling a C Python module, we need a compiler. It is easiest to just install build-sessential: "sudo apt-get install build-essential".
- Make sure subversion is installed so you can grab the source: "sudo apt-get install subversion".
- Download the source by typing: "svn export https:/
- Enter the xmouse directory and install the module by typing: "sudo python setup.py".
- Enter the idle-watch directory and run the program by typing: "sudo ./idle-watch.py".
- To obtain more interesting results, try running the program with an idle timeout of 4 seconds, verbose mode, and assigning both config files: "sudo ./idle-watch.py -i 4 -v -c idle.conf -a active.conf".
CHANGELOG
See https:/
LICENSE
See https:/
PACKAGING
I have little to no experience creating Debian/Ubuntu packages, and I am especially lost when it comes to packaging something like xmouse (a C Python module). Anyone think they can whip something up quickly in that regard?
I'm marking this as obsolete as since external players are going away (have gone away)