Skip to content

Instantly share code, notes, and snippets.

@mweitzel
Created September 16, 2016 15:52
Show Gist options
  • Save mweitzel/633a7db8972a9e54d19e635930fc5dae to your computer and use it in GitHub Desktop.
Save mweitzel/633a7db8972a9e54d19e635930fc5dae to your computer and use it in GitHub Desktop.
ping pong!
( •_•)O* a(•_• )
( •_•)O*¯ a(•_• )
( •_•)O* ` a(•_• )
( •_•)O · a(•_• )
( •_•)o . a(•_• )
( •_•)o ¸ a(•_• )
( •_•)o . a(•_• )
( •_•)o · a(•_• )
( •_•)o ´ q(•_• )
( •_•)o ¯ q(•_• )
( •_•)o ` Q(•_• )
( •_•)o °Q(•_• )
( •_•)o °Q(•_• )
( •_•)o ` Q(•_• )
( •_•)o ¯ Q(•_• )
( •_•)o ´ q(•_• )
( •_•)o · q(•_• )
( •_•)o . q(•_• )
( •_•)o ¸ q(•_• )
( •_•)o . a(•_• )
( •_•)O · a(•_• )
( •_•)O ` a(•_• )
( •_•)O ¯ a(•_• )
function title() {
local text="$*"
echo -ne "\033]0;$text\007"
# ESC BEL
# http://tldp.org/HOWTO/Xterm-Title-4.html
}
ping_pong() {
local __i=1
local sprite_sheet=$(cat pingpong-sprites)
local modulus=$(echo "$sprite_sheet" | wc -l)
while true
do
title "$(echo "$sprite_sheet" | head -n $__i | tail -n 1)"
__i=$(((($__i + 1) % 24) + 1))
sleep 0.1
done
}
ping_pong &
@mweitzel
Copy link
Author

ping-pong

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