Compare commits
No commits in common. "28e86dbd86ebbf7f6e7f3e0f16913dea07766907" and "ebd1a40e37f4203d037f4fa359814cf94236fc14" have entirely different histories.
28e86dbd86
...
ebd1a40e37
2 changed files with 33 additions and 32 deletions
37
bin/gradient
37
bin/gradient
|
@ -1,28 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ensure COLUMNS is set
|
||||
# stty size > /dev/null
|
||||
|
||||
COLUMNS=$(tput cols)
|
||||
# delay for wezterm to learn it's size
|
||||
sleep 0.2
|
||||
|
||||
line() {
|
||||
i=1
|
||||
while [[ $i -le $COLUMNS ]]; do
|
||||
echo -en "\U1FB$((RANDOM % 3))$((RANDOM % 8+1))"
|
||||
i=$((i + 1))
|
||||
done
|
||||
i=1
|
||||
while [[ $i -le $COLUMNS ]]; do
|
||||
echo -en "\u258$((RANDOM % 8 + 1))"
|
||||
i=$((i + 1))
|
||||
done
|
||||
}
|
||||
|
||||
print-line() {
|
||||
awk -v columns="$COLUMNS" -v s="$(line)" \
|
||||
'BEGIN{
|
||||
for (colnum = 0; colnum<columns+1; colnum++) {
|
||||
echo
|
||||
awk -v columns="$COLUMNS" -v s="$(line)" \
|
||||
'BEGIN{
|
||||
for (colnum = 0; colnum<columns+1; colnum++) {
|
||||
r = 255-(colnum*255/columns);
|
||||
g = (colnum*510/columns);
|
||||
b = (colnum*255/columns);
|
||||
if (g>255) g = 510-g;
|
||||
printf "\033[38;2;%d;%d;%d;49m", r,g,b;
|
||||
printf "\033[38;2;%d;%d;%dm", r,g,b;
|
||||
printf "%s\033[0m", substr(s,colnum+1,1);
|
||||
}
|
||||
printf "\n";
|
||||
}'
|
||||
}
|
||||
|
||||
print-line
|
||||
print-line
|
||||
}
|
||||
printf "\n";
|
||||
}'
|
||||
|
|
|
@ -3,20 +3,20 @@
|
|||
|
||||
# >>> conda initialize >>>
|
||||
# !! Contents within this block are managed by 'conda init' !!
|
||||
__conda_setup="$('$HOME/mambaforge/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
||||
__conda_setup="$('$HOME/mambaforge/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__conda_setup"
|
||||
eval "$__conda_setup"
|
||||
else
|
||||
if [ -f "$HOME/mambaforge/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/mambaforge/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/mambaforge/bin:$PATH"
|
||||
fi
|
||||
if [ -f "$HOME/mambaforge/etc/profile.d/conda.sh" ]; then
|
||||
. "$HOME/mambaforge/etc/profile.d/conda.sh"
|
||||
else
|
||||
export PATH="$HOME/mambaforge/bin:$PATH"
|
||||
fi
|
||||
fi
|
||||
unset __conda_setup
|
||||
|
||||
if [ -f "$HOME/mambaforge/etc/profile.d/mamba.sh" ]; then
|
||||
. "$HOME/mambaforge/etc/profile.d/mamba.sh"
|
||||
. "$HOME/mambaforge/etc/profile.d/mamba.sh"
|
||||
fi
|
||||
# <<< conda initialize <<<
|
||||
|
||||
|
@ -24,16 +24,16 @@ fi
|
|||
|
||||
# >>> mamba initialize >>>
|
||||
# !! Contents within this block are managed by 'mamba init' !!
|
||||
export MAMBA_EXE="$HOME/.local/bin/micromamba"
|
||||
export MAMBA_ROOT_PREFIX="$HOME/micromamba"
|
||||
__mamba_setup="$('$HOME/.local/bin/micromamba' shell hook --shell zsh --prefix '/home/daylin/micromamba' 2>/dev/null)"
|
||||
export MAMBA_EXE="/home/daylin/.local/bin/micromamba"
|
||||
export MAMBA_ROOT_PREFIX="/home/daylin/micromamba"
|
||||
__mamba_setup="$('/home/daylin/.local/bin/micromamba' shell hook --shell zsh --prefix '/home/daylin/micromamba' 2>/dev/null)"
|
||||
if [ $? -eq 0 ]; then
|
||||
eval "$__mamba_setup"
|
||||
else
|
||||
if [ -f "$HOME/micromamba/etc/profile.d/micromamba.sh" ]; then
|
||||
. "$HOME/micromamba/etc/profile.d/micromamba.sh"
|
||||
if [ -f "/home/daylin/micromamba/etc/profile.d/micromamba.sh" ]; then
|
||||
. "/home/daylin/micromamba/etc/profile.d/micromamba.sh"
|
||||
else
|
||||
export PATH="$HOME/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
|
||||
export PATH="/home/daylin/micromamba/bin:$PATH" # extra space after export prevents interference from conda init
|
||||
fi
|
||||
fi
|
||||
unset __mamba_setup
|
||||
|
|
Loading…
Reference in a new issue