ticker now properly scales to cols and has a dev option to just be a printf
This commit is contained in:
parent
cfb6228116
commit
c520435502
@ -2,4 +2,5 @@
|
||||
# ESPECIALLY DON'T EDIT this file if you're using zeesh near nuclear reactor
|
||||
# control software for whatever unimaginable reason.
|
||||
|
||||
_zeeshdev_ignore_updates=0
|
||||
_zeeshdev_ignore_updates=0
|
||||
_zeeshdev_ticker_newlines=0
|
@ -1,11 +1,14 @@
|
||||
function ticker_message () {
|
||||
# TODO: get cols and scale
|
||||
printf "\r \r"
|
||||
cols=$(stty -a | grep -Po '(?<=columns )\d+' | tr -d "\n")
|
||||
|
||||
printf "$@"
|
||||
function ticker_message () {
|
||||
if [[ $_zeeshdev_ticker_newlines == 0 ]]; then
|
||||
printf "\r${(l:$cols:: :)A}\r"
|
||||
printf "$@"
|
||||
else
|
||||
printf "$@\n"
|
||||
fi
|
||||
}
|
||||
|
||||
function ticker_finish () {
|
||||
# TODO: get cols and scale
|
||||
printf "\r \r"
|
||||
[[ $_zeeshdev_ticker_newlines == 0 ]] && printf "\r${(l:$cols:: :)A}\r"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user