Last active
April 7, 2023 03:53
-
-
Save aerphanas/26a169caa9c1fe7f90d9067f3b0639d1 to your computer and use it in GitHub Desktop.
spam with xdotolls
This file contains hidden or 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
| #!/usr/bin/env -S sbcl --script | |
| (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" | |
| (user-homedir-pathname)))) | |
| (when (probe-file quicklisp-init) | |
| (load quicklisp-init))) | |
| (defun main () | |
| (let ((counter 0)) | |
| (loop | |
| (format t "~d spaming...~%" counter) | |
| (force-output) | |
| (uiop:run-program "xdotool type test") | |
| (sleep 1) | |
| (uiop:run-program "xdotool key BackSpace BackSpace BackSpace BackSpace") | |
| (setf counter (1+ counter))))) | |
| (handler-case | |
| (main) | |
| (sb-sys:interactive-interrupt () (progn | |
| (format *error-output* "~%Abort.~&") | |
| (sb-ext:exit)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment