summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/xitui.sh14
-rwxr-xr-xsrc/util/shmk.sh16
2 files changed, 24 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 () {
diff --git a/src/util/shmk.sh b/src/util/shmk.sh
index 75b97f7..75e1445 100755
--- a/src/util/shmk.sh
+++ b/src/util/shmk.sh
@@ -4,6 +4,8 @@
#include colors
+PREFIX=${PREFIX:-/usr}
+
usage () {
cat << EOF
${BLUE}Available Options:
@@ -102,6 +104,20 @@ interpret_shmk () {
install -Dm755 $DIST/$lib ${DESTDIR}/${PREFIX}/lib/$lib.sh #Install library $lib"
done
;;
+ uninstall)
+ for prog in $PROGS; do
+ prog=$(basename $prog)
+ prog="${prog%.*}"
+ cmdlist="$cmdlist
+ rm ${DESTDIR}/${PREFIX}/bin/$prog #Uninstall program $prog"
+ done
+ for lib in $LIBS; do
+ lib=$(basename $lib)
+ lib="${lib%.*}"
+ cmdlist="$cmdlist
+ rm $DIST/$lib ${DESTDIR}/${PREFIX}/lib/$lib.sh #Uninstall library $lib"
+ done
+ ;;
clean)
[ -d "$DIST" ] && cmdlist="$cmdlist
rm -r $DIST #Clean"