Advertisement
OgreAlan

mousetoggle.sh

Nov 25th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.29 KB | None | 0 0
  1. #!/usr/bin/env sh
  2. # emulate mouse button click by checking for existence of file
  3. file="/tmp/mousedown"
  4. if [ ! -f "$file" ]
  5. then
  6.     xdotool mousedown 1
  7.     echo "left mousebutton pressed"
  8.     touch $file
  9. else
  10.     xdotool mouseup 1
  11.     echo "left mousebutton released"
  12.     rm $file
  13. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement