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
@ -3,3 +3,4 @@
|
|||||||
# control software for whatever unimaginable reason.
|
# 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 () {
|
cols=$(stty -a | grep -Po '(?<=columns )\d+' | tr -d "\n")
|
||||||
# TODO: get cols and scale
|
|
||||||
printf "\r \r"
|
|
||||||
|
|
||||||
|
function ticker_message () {
|
||||||
|
if [[ $_zeeshdev_ticker_newlines == 0 ]]; then
|
||||||
|
printf "\r${(l:$cols:: :)A}\r"
|
||||||
printf "$@"
|
printf "$@"
|
||||||
|
else
|
||||||
|
printf "$@\n"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function ticker_finish () {
|
function ticker_finish () {
|
||||||
# TODO: get cols and scale
|
[[ $_zeeshdev_ticker_newlines == 0 ]] && printf "\r${(l:$cols:: :)A}\r"
|
||||||
printf "\r \r"
|
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,6 @@ source ~/.local/share/zeesh/base/zeesh.zsh
|
|||||||
|
|
||||||
ticker_message "zeesh: bootstrap"
|
ticker_message "zeesh: bootstrap"
|
||||||
|
|
||||||
cols=$(stty -a | grep -Po '(?<=columns )\d+' | tr -d "\n")
|
|
||||||
|
|
||||||
if [[ $cols -lt 80 ]]; then
|
if [[ $cols -lt 80 ]]; then
|
||||||
if [[ $(uname -o) == "Android" ]]; then
|
if [[ $(uname -o) == "Android" ]]; then
|
||||||
hostemoji="📞"
|
hostemoji="📞"
|
||||||
|
Loading…
Reference in New Issue
Block a user