Skip to content

Instantly share code, notes, and snippets.

@aerphanas
Last active April 7, 2023 03:53
Show Gist options
  • Select an option

  • Save aerphanas/26a169caa9c1fe7f90d9067f3b0639d1 to your computer and use it in GitHub Desktop.

Select an option

Save aerphanas/26a169caa9c1fe7f90d9067f3b0639d1 to your computer and use it in GitHub Desktop.
spam with xdotolls
#!/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