#!/bin/bashA=0while true do eval $(xdotool getmouselocation --shell) if [ $X -eq 0 ] ; then if [ $Y -eq 0 ] ; then if [ $A -eq 0 ] ; then kcalc A=1 fi fi fi if [ $X -ne 0 ] || [ $Y -ne 0 ] ; then if [ $A -eq 1 ] ; then pkill -15 kcalc A=0 fi fi sleep 1 done