Advertisement
metalx1000

My Mouse Location

Jan 18th, 2012
2,121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.37 KB | None | 0 0
  1. #!/bin/bash
  2. #Author: Kris Occhipinti (A.K.A. Metalx1000)
  3. #Description: Gets your mouse location and echos "top left" when the cursor is moved to the top left of the screen.
  4. #April. 2010
  5. #http://www.BASHscripts.info
  6. #GPL v3
  7.  
  8. while [ 1 ];
  9. do
  10.     m=`xdotool getmouselocation|sed 's/x:\(.*\) y:\(.*\) screen:.*/\1, \2/'`
  11.     if [ "$m" = "0, 0" ];
  12.     then
  13.         echo "top left"
  14.     fi
  15. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement