Compare commits

...

2 commits

Author SHA1 Message Date
28e86dbd86 update gradient start 2022-09-06 23:22:38 -05:00
db6188d61d update conda inits 2022-09-06 13:47:06 -05:00
2 changed files with 32 additions and 33 deletions

View file

@ -1,20 +1,15 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ensure COLUMNS is set
# stty size > /dev/null
COLUMNS=$(tput cols) COLUMNS=$(tput cols)
# delay for wezterm to learn it's size
sleep 0.2
line() { line() {
i=1 i=1
while [[ $i -le $COLUMNS ]]; do while [[ $i -le $COLUMNS ]]; do
echo -en "\u258$((RANDOM % 8 + 1))" echo -en "\U1FB$((RANDOM % 3))$((RANDOM % 8+1))"
i=$((i + 1)) i=$((i + 1))
done done
} }
echo
print-line() {
awk -v columns="$COLUMNS" -v s="$(line)" \ awk -v columns="$COLUMNS" -v s="$(line)" \
'BEGIN{ 'BEGIN{
for (colnum = 0; colnum<columns+1; colnum++) { for (colnum = 0; colnum<columns+1; colnum++) {
@ -22,8 +17,12 @@ awk -v columns="$COLUMNS" -v s="$(line)" \
g = (colnum*510/columns); g = (colnum*510/columns);
b = (colnum*255/columns); b = (colnum*255/columns);
if (g>255) g = 510-g; if (g>255) g = 510-g;
printf "\033[38;2;%d;%d;%dm", r,g,b; printf "\033[38;2;%d;%d;%d;49m", r,g,b;
printf "%s\033[0m", substr(s,colnum+1,1); printf "%s\033[0m", substr(s,colnum+1,1);
} }
printf "\n"; printf "\n";
}' }'
}
print-line
print-line

View file

@ -24,16 +24,16 @@ fi
# >>> mamba initialize >>> # >>> mamba initialize >>>
# !! Contents within this block are managed by 'mamba init' !! # !! Contents within this block are managed by 'mamba init' !!
export MAMBA_EXE="/home/daylin/.local/bin/micromamba" export MAMBA_EXE="$HOME/.local/bin/micromamba"
export MAMBA_ROOT_PREFIX="/home/daylin/micromamba" export MAMBA_ROOT_PREFIX="$HOME/micromamba"
__mamba_setup="$('/home/daylin/.local/bin/micromamba' shell hook --shell zsh --prefix '/home/daylin/micromamba' 2>/dev/null)" __mamba_setup="$('$HOME/.local/bin/micromamba' shell hook --shell zsh --prefix '/home/daylin/micromamba' 2>/dev/null)"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
eval "$__mamba_setup" eval "$__mamba_setup"
else else
if [ -f "/home/daylin/micromamba/etc/profile.d/micromamba.sh" ]; then if [ -f "$HOME/micromamba/etc/profile.d/micromamba.sh" ]; then
. "/home/daylin/micromamba/etc/profile.d/micromamba.sh" . "$HOME/micromamba/etc/profile.d/micromamba.sh"
else else
export PATH="/home/daylin/micromamba/bin:$PATH" # extra space after export prevents interference from conda init export PATH="$HOME/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
fi fi
fi fi
unset __mamba_setup unset __mamba_setup