Created
September 16, 2016 15:52
-
-
Save mweitzel/633a7db8972a9e54d19e635930fc5dae to your computer and use it in GitHub Desktop.
ping pong!
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
( •_•)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(•_• ) |
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
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 & |
Author
mweitzel
commented
Sep 16, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment