From 42a36d0938727cc94d085a898f3ac85207dde2d3 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Tue, 27 Jul 2021 23:48:36 +0000 Subject: [PATCH] Merge branch 'master' of github.com:Chizi123/Scripts --- autoclick.sh | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/autoclick.sh b/autoclick.sh index ccb402e..3c0f379 100755 --- a/autoclick.sh +++ b/autoclick.sh @@ -1,5 +1,11 @@ #!/bin/sh +if [ "$XDG_SESSION_TYPE" = "wayland" ]; then + TOOL=ydotool +else + TOOL=xdotool +fi + if [ "$(pgrep autoclick | wc -l)" = "2" ]; then true else @@ -7,6 +13,7 @@ fi while :; do - xdotool click --delay 100 --repeat 10 1 + $TOOL click 1 + sleep 0.1 done -- Gitblit v1.9.3