How to make whiptail full terminal screen? "as big as the terminal", like fluid CSS, something like 100%
Asked
Active
Viewed 2,082 times
2 Answers
9
stty size gives you all you need. So for example:
whiptail --msgbox test $(stty size)
Steven
- 191
- 1
- 3
1
Do you mean something like this?
whiptail --msgbox hello $(stty -a | tr \; \\012 |
egrep 'rows|columns' | cut '-d ' -f3)
Celada
- 43,173
- 5
- 96
- 105
-
exactly like that, could you please modify it slightly to make it work with my own script here http://unix.stackexchange.com/questions/182021/questions-about-whiptail-and-bash-functions ? It's working but when I try to put it in my existing script, I get errors – Lynob Jan 30 '15 at 15:59
-
If I substitute that `$(stty ...)` pipeline into the `whiptail` command you have over at that other question it works fine for me. – Celada Jan 31 '15 at 03:59