Created
October 13, 2019 17:05
-
-
Save dgalli1/dd10c9357c3b402023995f860ca709a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
is_running=false | |
trap ctrl_c INT | |
function ctrl_c() { | |
pkill xpointerbarrier | |
exit | |
} | |
while true | |
do | |
test=$(xdotool getwindowfocus getwindowname) | |
echo $test | |
if [ "$test" = "League of Legends (TM) Client" ]; then | |
if ! $is_running ; then | |
# top left right bottom | |
# i would recommnd putting left and right on 5 pxs if you have 3 monitors | |
nohup xpointerbarrier 0 5 5 0 &>/dev/null & | |
fi | |
else | |
pkill xpointerbarrier | |
is_running=false | |
fi | |
sleep 0.1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment