Created
June 21, 2019 19:29
-
-
Save hook-s3c/3b3adeca6af2602fc34e26ff400197e2 to your computer and use it in GitHub Desktop.
Cleaning Discord chats
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
| #!/bin/bash | |
| #if test "$#" -ne 2; | |
| # then echo "example usage: ./cleandiscord.sh general 30" | |
| # exit 1 | |
| #fi | |
| #WID=`xdotool search --onlyvisible --name "$1" | head -1` | |
| #xdotool windowactivate --sync $WID | |
| xdotool windowactivate --sync $(xdotool selectwindow) | |
| xdotool getactivewindow key --repeat $1 --delay 40 --repeat-delay 20 Up Ctrl+a Delete Return Return | |
| #xdotool getactivewindow key --repeat 30 --delay 300 --repeat-delay 400 Up Ctrl+a Delete Return Return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment