Skip to content

Instantly share code, notes, and snippets.

@ddrscott
Last active September 27, 2018 19:06
Show Gist options
  • Save ddrscott/4a928d1f3418e5e10f90e0bbbbe40b73 to your computer and use it in GitHub Desktop.
Save ddrscott/4a928d1f3418e5e10f90e0bbbbe40b73 to your computer and use it in GitHub Desktop.
#!/bin/zsh
poop(){
zle self-insert
if [ $((RANDOM % 10)) -eq 0 ]; then
(printf "\e[s\e[$((${RANDOM} % $LINES + 1));$((${RANDOM} % $COLUMNS + 1))H\xF0\x9F\x92\xA9\e[u" &)
fi
}
zle -N poop
bindkey 'e' poop
@ddrscott
Copy link
Author

curl -L https://bit.ly/randpoop >> ~/.zshrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment