use tput again

This commit is contained in:
Daylin Morgan 2022-09-02 15:57:52 -05:00
parent 1ee0189ff6
commit d2b782d384

View file

@ -1,8 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# ensure COLUMNS is set # ensure COLUMNS is set
stty size > /dev/null # stty size > /dev/null
COLUMNS=$(tput cols)
# delay for wezterm to learn it's size # delay for wezterm to learn it's size
sleep 0.2 sleep 0.2
@ -13,7 +14,7 @@ line() {
i=$((i + 1)) i=$((i + 1))
done done
} }
echo
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++) {