summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/print_bash_color7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/print_bash_color b/scripts/print_bash_color
index 43f6fcc..c392ebd 100755
--- a/scripts/print_bash_color
+++ b/scripts/print_bash_color
@@ -2,13 +2,14 @@
# dotfiles -- print_bash_color
# author: johannst
-#{{{ print colors 0-15 fg/bg
+#{{{ print colors 0-15 fg/bg
# (colors can be generated with http://ciembor.github.io/4bit)
fg=(' ' '1' '30' '1;30' '31' '1;31' '32' '1;32' '33' '1;33' '34' '1;34' '35' '1;35' '36' '1;36' '37' '1;37')
bg=(' ' '40' '41' '42' '43' '44' '45' '46' '47')
-printf '%10s ' ""
+echo 'Use as > echo "\e[(fg);(bg)m"'
+printf 'fg\\bg%6s' ""
color_line=" m\e[m TEST \e[m"
for b in ${bg[@]}; do
printf '%6s ' "${b}m"
@@ -31,7 +32,7 @@ done
for i in $(seq 0 255); do
color_line="\\e[38;5;${i}"
printf "\e[38;5;${i}m%11s " $color_line;
- if [ $((((i+1)) % 16)) == 0 ]; then printf '\n'; fi
+ if [ $((((i+1)) % 8)) == 0 ]; then printf '\n'; fi
done
#}}}