truestuff/show-console.sh
Lockszmith 01cb3798ed Some more goodies
fix-kubectl - updated tool versions
foreach-secret - a tool to export an ix-app's secret, executing a
command line on the content.

Was created to periodically update AdGuard Home HTTPS certificate over
SSH.

show-console - designed to be executed with `watch`:
    `sudo watch ./show-console.sh'

Will output what is shown on the console.
2024-02-05 12:11:00 -05:00

34 lines
534 B
Bash
Executable file

#! /usr/bin/env bash
res() {
old=$(stty -g)
stty raw -echo min 0 time 5
printf '\0337\033[r\033[999;999H\033[6n\0338' > /dev/tty
IFS='[;R' read -r _ rows cols _ < /dev/tty
stty "$old"
# echo "cols:$cols"
# echo "rows:$rows"
stty cols "$cols" rows "$rows"
}
res2() {
old=$(stty -g)
stty raw -echo min 0 time 5
printf '\033[18t' > /dev/tty
IFS=';t' read -r _ rows cols _ < /dev/tty
stty "$old"
# echo "cols:$cols"
# echo "rows:$rows"
stty cols "$cols" rows "$rows"
}
stty cols 80
cat /dev/vcs