This commit is contained in:
raul 2024-01-18 06:52:05 +01:00
parent 148c024035
commit af90d6fdfe
3 changed files with 37 additions and 1 deletions

View File

@ -1,3 +1,11 @@
<<<<<<< HEAD
# x11-autoclicker # x11-autoclicker
Rudimentary autoclicker for X11 Linux setups Rudimentary autoclicker for X11 Linux setups
=======
# Test
* Element 1
* Element 2
>>>>>>> ad1d17c (Startup)

4
clicks.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
while true; do
xdotool click 1
done

24
toggler.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
cmd="$(which xdotool)"
# TODO: improve error handling
# cmd="/usr/local/bin/xdotool"
if test -e "$cmd"; then
echo "[+] xdotool exists, continuing the script!"
else
echo "[-] xdotool doesn't exist, this script won't run on your computer"
exit 2
fi
if pidof -x clicks.sh > /dev/null; then
#echo "clicks is active, deactivating"
notify-send "Clicks is active, deactivating" &
kill $(pidof -x clicks.sh)
else
notify-send "Clicks isn't active, activating" &
#echo "clicks isn't active, activating"
$(find ~ -name 'clicks.sh') | head -n1 &
fi