summaryrefslogtreecommitdiff
path: root/src/lib/xitui.sh
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-10-14 23:33:51 +0100
committerdavidovski <david@davidovski.xyz>2023-10-14 23:33:51 +0100
commit982b671051d988b374808cd7bd67310d8e9a4d51 (patch)
treebad10e92e53ca6c04809f77624c79922bbb372e6 /src/lib/xitui.sh
parentea240f2887f66ef8cee7e5789e513436be1571b6 (diff)
add proper t_clsHEADmaster
Diffstat (limited to 'src/lib/xitui.sh')
-rw-r--r--src/lib/xitui.sh14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/xitui.sh b/src/lib/xitui.sh
index 33d5e87..2b55475 100644
--- a/src/lib/xitui.sh
+++ b/src/lib/xitui.sh
@@ -38,7 +38,6 @@ t_init () {
tput clear
t_set_tty
t_gen_ptrn
-
}
t_set_tty () {
@@ -63,10 +62,6 @@ readc () {
}
-t_cls () {
- tput clear
-}
-
t_no_cur () {
tput civis
}
@@ -123,6 +118,11 @@ t_prnt_ptrn () {
printf "$@$P"
}
+t_cls () {
+ printf ""
+ printf " %.0s" $(seq $(( (LINES-14) * COLUMNS)))
+}
+
t_cls_ptrn () {
printf ""
printf " %.0s" $(seq $(( (LINES-14) * COLUMNS)))
@@ -339,6 +339,7 @@ t_check () {
t_drw_txt $((x-3)) $((py+sel)) "x"
;;
esac
+ sel=$(((sel+1)%btns_len))
};;
esac
done
@@ -380,7 +381,8 @@ t_input_hidden () {
}
t_tail() {
- t_drw_txt 0 7 "$(tail -$((LINES-14)) $1)"
+ [ -f "$1" ] && file="$1" || file=/dev/stdin
+ t_drw_txt 0 7 "$( tail -$((LINES-14)) $1)"
}
t_paged_radio () {