Created
April 18, 2020 06:00
-
-
Save nevikw39/dbf771953734a556b768bbc180eb02a1 to your computer and use it in GitHub Desktop.
以模擬方式將剪貼內容逐字輸入至 konsole 視窗,藉以獲得 p 幣。
This file contains 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/zsh | |
zmodload -i zsh/mathfunc | |
for pid in $(pgrep konsole); do | |
for window in $(xdotool search --pid $pid); do | |
if [[ "$(xdotool getwindowname $window)" =~ "ptt" ]]; then | |
xdotool type --window $window --delay $(( 666 + 1334 * rand48() )) $(xclip -o -selection clipboard); | |
fi | |
done; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment