1
0
Fork 0
mirror of https://github.com/Ylianst/MeshCentral.git synced 2025-03-09 15:40:18 +00:00

Add dynamic resizing of xterm

This commit is contained in:
TotallyNotElite 2020-01-24 23:01:58 +01:00
parent 58029d3b16
commit 413ed5c893
2 changed files with 20 additions and 7 deletions

View file

@ -171,6 +171,7 @@
break;
case 3:
// Connected
tunnel.sendText(`mcresize() { 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";stty cols "$cols" rows "$rows"; };trap mcresize SIGWINCH;clear\n`);
term.focus();
break;
default: