mirror of
https://github.com/linka-cloud/d2vm.git
synced 2025-06-23 22:02:25 +00:00
cli: improve flags and commands
docs: add README.md and examples centos/rhel: fix dracut initramfs Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
13
examples/full/resize
Executable file
13
examples/full/resize
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
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"
|
Reference in New Issue
Block a user