48 lines
653 B
Bash
Executable file
48 lines
653 B
Bash
Executable file
#!/bin/sh
|
|
|
|
black="111111" # black
|
|
red="f92672" # red
|
|
green="a6e22e" # green
|
|
yellow="f4bf75" # yellow
|
|
blue="66d9ef" # blue
|
|
magenta="ae81ff" # magenta
|
|
cyan="a1efe4" # cyan
|
|
white="cccccc" # white
|
|
black2="75715e" # black
|
|
white2="f8f8f8" # white
|
|
|
|
c() {
|
|
c="${1}"; shift
|
|
for n in "$@"; do
|
|
echo -e "\e]P${n}${c}";
|
|
done
|
|
}
|
|
|
|
c $black 0
|
|
c $red 1 9
|
|
c $green 2 A
|
|
c $yellow 3 B
|
|
c $blue 4 C
|
|
c $magenta 5 D
|
|
c $cyan 6 E
|
|
c $white 7
|
|
c $black2 8
|
|
c $white2 F
|
|
|
|
if [ -x /sbin/clear ]; then
|
|
/sbin/clear
|
|
else
|
|
echo -e "\e[H\e[2J"
|
|
fi
|
|
|
|
unset -f c
|
|
unset black
|
|
unset red
|
|
unset green
|
|
unset yellow
|
|
unset blue
|
|
unset magenta
|
|
unset cyan
|
|
unset white
|
|
unset black2
|
|
unset white2
|