Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # It is a program named autoclutter, and it is sensing if flash player is in
- # fullscreen and than it will hide the cursor with the unclutter command.
- # It will also hide when the mouse cursor is on the right edge of the screen.
- # You will need packages: unclutter xdotool
- #
- # Under license GPLv3
- # Made by té
- resx=`xdpyinfo | grep dimensions | sed 's/[a-z :]*//' | sed 's/\([0-9]*\).*/\1/'`
- while true; do
- if ((xwininfo -tree -root | grep plugin | grep $resx > /dev/null) || (xdotool getmouselocation | grep `expr $resx - 1` > /dev/null))
- then
- ps aux | grep -v defunct | grep -v grep | grep -v autounclutter | grep unclutter > /dev/null || unclutter -idle 3 -jitter 50 &
- else
- ps aux | grep -v defunct | grep -v grep | grep -v autounclutter | grep unclutter > /dev/null && killall unclutter > /dev/null
- fi
- sleep 3; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement