dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

commit 77aa93f26cbade8c224b5d043589f84a508ce1a5
parent d2d5f9defc66bfba6cf7e5ee2c088d6f3542f0ae
Author: Chris Noxz <chris@noxz.tech>
Date:   Fri,  1 May 2020 18:00:10 +0200

[bin] add a small script for viewing 256 colors

Diffstat:
Abin/.local/bin/256colors | 32++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+), 0 deletions(-)

diff --git a/bin/.local/bin/256colors b/bin/.local/bin/256colors @@ -0,0 +1,32 @@ +#!/bin/sh + +# for (i = (-1+1); i <= 255; i+=1) +i=-1; while [ $((i+=1)) -le 255 ]; do + [ \ + $i -lt 16 -a $(( i % 8 )) -ne 0 -o \ + $i -gt 231 -a $(( i % 8 )) -ne 0 -o \ + $i -ge 16 -a $i -le 231 -a $(( (i - 16) % 6 )) -ne 0 \ + ] && printf ' ' + + [ \ + $i -gt 0 -a $i -le 16 -a $(( i % 8 )) -eq 0 -o \ + $i -gt 231 -a $(( i % 8 )) -eq 0 -o \ + $i -ge 16 -a $i -le 231 -a $(( (i - 16) % 6 )) -eq 0 \ + ] && printf '\n' + + [ \ + $i -ge 16 -a $i -le 232 -a $(( (i - 16) % 36 )) -eq 0 \ + ] && printf '\n' + + tput setab $i; + [ \ + $i -le 16 -a $(( i % 8 )) -lt 2 -o \ + $i -gt 231 -a $i -lt 244 -o \ + $i -gt 16 -a $i -lt 232 -a \ + $(( (i - 16) % 36 )) -lt 18 \ + ] && tput setaf 15 || tput setaf 16 + printf ' %03d ' $i + + tput op +done +printf '\n'