diff --git a/bin/__build_sgr_code b/bin/__build_sgr_code index 6d2db2a..0b025e9 100755 --- a/bin/__build_sgr_code +++ b/bin/__build_sgr_code @@ -100,6 +100,77 @@ function dump_colors() exit 0 } +function cube_row() +{ + r_base=${1} + g=0 + while (( g < 6 )) + do + u=0 + while (( u < 3 )) + do + r=$(( r_base + u )) + + b=0 + while (( b < 6 )) + do + i=$(( 16 + ( r * 36 ) + ( g * 6 ) + ( b ) )) + + txt="" && [ ${g} -lt 3 ] && txt=';37;1' + + printf "[30${txt}m[48;5;${i}m%3i " ${i} + + b=$(( b + 1 )) + done + + printf ' ' + + u=$(( u + 1 )) + done + + printf '\n' + + g=$(( g + 1 )) + done + printf '\n' +} + +function greyscale_chart() +{ + [ ${i} -ge 244 ] && txt=";30" + + local k=$(( i + 12 )) + while (( i < k )) + do + printf "[48;5;${i};37;1${txt}m%3i " ${i} + i=$(( i + 1 )) + done + printf '\n' +} + +function color_chart() +{ + i=0 + + # Base 16 + while (( i < 16 )) + do + [ ${i} -gt 0 ] && txt=";30" + + printf "[37;1${txt};48;5;${i}m%3i " ${i} + i=$(( i + 1 )) + done + printf '\n\n' + + r=0;g=0;b=0 + cube_row 0 + cube_row 3 + i=$(( 6 * 6 * 6 + 16 )) + + greyscale_chart + greyscale_chart +} + function setup_color_depth() { use_8_bit=0 @@ -383,6 +454,7 @@ function build_sgr_code() { case $1 in dump-colors) dump_colors ;; + color-chart) color_chart ;; reset) next=0 ;; bold) next=1 ;; diff --git a/bin/setup-touch.sh b/bin/setup-touch.sh index b4db5d4..4498e68 100755 --- a/bin/setup-touch.sh +++ b/bin/setup-touch.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -DEVICE=$(xinput list --name-only | grep "Touchpad") +DEVICE="$(xinput list --name-only | grep "Touchpad$")" echo Device is ${DEVICE} xinput set-prop "${DEVICE}" "libinput Tapping Enabled" 1 diff --git a/ssh/sample.config b/ssh/sample.config new file mode 100644 index 0000000..f07b7b8 --- /dev/null +++ b/ssh/sample.config @@ -0,0 +1,14 @@ +Match all + include ~/cshenv/ssh/prologue + +# ---- Host specific options go here... + +# Host foo.bar + # User quux + +# ---- End of host specific options... + +Match all + include ~/cshenv/ssh/epilogue + +# vim: ft=sshconfig diff --git a/tcshrc b/tcshrc index 457b67e..c5bc114 100644 --- a/tcshrc +++ b/tcshrc @@ -7,7 +7,7 @@ if( ( $?CSHENV_DEBUG ) || ( $?CSHENV_VERBOSE_STARTUP ) ) then echo "Currently running tcshrc script" endif -set path=( ${CSHENV_DIR}/bin ${path} ) +set path=( ${CSHENV_DIR}/bin ${HOME}/.local/opt/bin ${path} ) setenv CSHENV_MACHINE_SUFFIX