summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2020-05-13 20:52:49 +0200
committerjohannst <johannes.stoelp@gmail.com>2020-05-13 20:52:49 +0200
commiteca283ea931748218b2863883ced17c8f5e0588d (patch)
tree6fcd056639a1480e414ec85eb37ea84d80f47c78 /scripts
parent75d7afd9ef93c71aecab080bced4a5a6011d8e9a (diff)
downloaddotfiles-eca283ea931748218b2863883ced17c8f5e0588d.tar.gz
dotfiles-eca283ea931748218b2863883ced17c8f5e0588d.zip
update script to dump shell colors
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
#}}}