This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/common/colors/vconsole

49 lines
653 B
Plaintext
Raw Normal View History

#!/bin/sh
2021-07-04 11:01:15 -05:00
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
2021-07-04 11:01:15 -05:00
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
2021-07-04 11:01:15 -05:00
echo -e "\e[H\e[2J"
fi
2021-07-04 11:01:15 -05:00
unset -f c
unset black
unset red
unset green
unset yellow
unset blue
unset magenta
unset cyan
unset white
unset black2
unset white2