之前摸鱼写的 jio 本🌝,可以放在 ~/.zshrc 文件的末尾,注入终端的上下文
预览效果如下:
灵感来自Animating URLs with Javascript and Emojis,祝各位看官玩得开心😊
# 抛硬币脚本
# Author: Lucien-X
# LastModified: 2019-02-22
coin() {
# Define backspace char
local BACKSPACE='\b\b'
# Loop animation for about 1s
local i="0"
while [ $i -lt 24 ]
do
for COIN in '🌝' '🌖' '🌗' '🌘' '🌚' '🌒' '🌓' '🌔'
do
echo -en "$BACKSPACE$COIN"
sleep 0.0417; # Insure 24 fps (1/24 ≈ 0.0417)
i=$[$i+1];
done
done
# Roll the dice eventually
echo -en $BACKSPACE
if [[ $[ $RANDOM % 2 ] == 0 ]] then
echo -en "🌝"
else
echo -en "🌚"
fi
}
1
sologgfun 2019-03-19 19:53:46 +08:00
蛮搞笑的
|
2
0ZXYDDu796nVCFxq 2019-03-19 19:55:48 +08:00 2
|
3
Coder89757 OP @gstqc 俄罗斯轮盘赌? hhhh
|
4
kinghui 2019-03-20 11:42:36 +08:00 1
|
5
Coder89757 OP @kinghui 哈哈,老铁可以的,够无聊,我喜欢
|
6
cgsv 2019-03-20 15:35:40 +08:00 1
|
7
laozhoubuluo 2019-03-25 22:50:06 +08:00
|