dotfiles/.local/bin/tools/watchit
Alexander Bocken 64a045064e Various changes
modified:   .config/coc/extensions/db.json
	modified:   .config/qutebrowser/bookmarks/urls
	modified:   .config/qutebrowser/qsettings/QtProject.conf
	modified:   .config/xprofile
	modified:   .local/bin/bt
	modified:   .local/bin/displayselect
	modified:   .local/bin/tools/dmenuhandler
	modified:   .local/bin/tools/dmenupass
	modified:   .local/bin/tools/passmenu2
	modified:   .local/bin/tools/watchit
	modified:   .local/bin/tools/wv
2020-08-12 14:19:35 +02:00

17 lines
343 B
Bash
Executable File

#!/bin/sh
HOME=$(tput cup 0 0)
ED=$(tput ed)
EL=$(tput el)
printf '%s%s' "$HOME" "$ED"
while true
do
ROWS=$(tput lines)
COLS=$(tput cols)
CMD="$*"
${SHELL:=sh} -c "$CMD" | head -n $ROWS | while IFS= read LINE; do
printf '%-*.*s%s\n' $COLS $COLS "$LINE" "$EL"
done
printf '%s%s' "$ED" "$HOME"
sleep 0.2
done