Compare commits

..

No commits in common. "4173e28c358cdbc5f3f89269c74f5f5c63e2b729" and "0cf8885785cd4b0bc49fd8f7ffc4122614abf17f" have entirely different histories.

3 changed files with 6 additions and 48 deletions

View file

@ -1,5 +1,4 @@
#!/usr/bin/env bash
sleep 0.2 # let wezterm catch up
COLUMNS=$(tput cols)
@ -11,28 +10,21 @@ line() {
done
}
peoples() {
i=1
while [[ $i -le $COLUMNS ]]; do
echo -en "\U1FBC$((RANDOM % 5 +5))"
i=$((i + 1))
done
}
echo
print-line() {
awk -v columns="$COLUMNS" -v s="$1" \
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;49;4m", r,g,b;
printf "\033[38;2;%d;%d;%d;49m", r,g,b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'
}
echo
print-line "$(peoples)"
print-line
print-line

View file

@ -1,34 +0,0 @@
#!/usr/bin/env bash
COLUMNS=$(tput cols)
digit() {
echo -en "\U1FBF$1 "
}
print-time() {
TIMESTAMP="$1"
for (( i=0; i<${#TIMESTAMP}; i++ )); do
digit "${TIMESTAMP:$i:1}"
done
}
spacing() {
for (( i=0; i<$1; i++ )); do
printf "%s" "-"
done
}
epoch=$(print-time "$(date +'%s')")
side=$(spacing $(((COLUMNS-(${#epoch}+6))/2)))
print-line() {
printf "\n\033[1m%s [ \033[1;9%dm%s\033[39m ] %s\033[0m\n" \
"$side" \
"$((RANDOM % 7+1))" \
"$1" \
"$side"
}
print-line "$epoch"

View file

@ -34,5 +34,5 @@ unset EXTRAFILE
export DOTFILES_DIR DOTFILES_EXTRA_DIR
# welcome art
! is-tty && $DOTFILES_DIR/bin/print-epoch
! is-tty && $DOTFILES_DIR/bin/gradient