Skip to content

Instantly share code, notes, and snippets.

@sasairc
Created December 3, 2014 08:53
Show Gist options
  • Save sasairc/2539390115612eaa41ee to your computer and use it in GitHub Desktop.
Save sasairc/2539390115612eaa41ee to your computer and use it in GitHub Desktop.
#!/bin/bash
#
# /* やめようね */
#
# Author:
# sasairc (@sasairc2)
#
# License
# WTFPL 2.0
#
W="\033[48;5;255m \033[m"
COLS=$(tput cols)
LINES=$(tput lines)
function _margin_width() {
WIDTH=$(expr \( $COLS - $1 \) / 2)
MARGIN_W=$(
for i in `seq 1 $WIDTH`; do
echo -n " "
done
)
}
function _margin_height() {
HEIGHT=$(expr \( $LINES - 13 \) / 2)
MARGIN_H=$(
for i in `seq 1 $HEIGHT`; do
echo " "
done
)
}
function steroid_hage() {
_margin_width 112
echo -en "
${MARGIN_H}
${MARGIN_W} $W$W $W$W $W$W$W$W $W $W $W $W
${MARGIN_W} $W$W$W$W $W$W $W$W$W$W $W $W $W $W $W $W $W$W
${MARGIN_W}$W$W$W $W $W$W $W $W $W $W $W $W $W$W $W$W
${MARGIN_W} $W $W$W$W$W $W $W $W $W $W$W $W $W$W $W$W$W $W$W $W
${MARGIN_W} $W$W $W $W $W $W $W $W $W $W$W $W$W $W$W$W $W
${MARGIN_W} $W $W $W $W $W $W $W $W $W$W $W$W $W$W$W$W$W$W
${MARGIN_W} $W $W $W $W $W$W$W$W $W $W $W$W $W$W $W$W $W$W
${MARGIN_W} $W$W $W $W $W$W$W$W $W $W $W$W $W$W $W $W$W
${MARGIN_W} $W$W $W$W $W$W
${MARGIN_W} $W$W $W$W $W$W
${MARGIN_W} $W$W $W$W $W$W
${MARGIN_W} $W$W $W$W $W$W
${MARGIN_W} $W$W $W$W $W$W
${MARGIN_W} $W$W $W$W $W$W
"
}
clear
trap 'clear; tput cnorm; exit 1' SIGINT
tput civis
_margin_height
steroid_hage
read
tput cnorm
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment