mirror of
https://github.com/brain-hackers/brain-config.git
synced 2025-01-03 10:00:07 +09:00
Fixed height suitable for all displays. Scalable width so that more text is visible on widescreen displays
This commit is contained in:
parent
69a97b3ccf
commit
fb7ce4c53f
@ -10,15 +10,15 @@ calc_wt_size() {
|
|||||||
# NOTE: it's tempting to redirect stderr to /dev/null, so supress error
|
# NOTE: it's tempting to redirect stderr to /dev/null, so supress error
|
||||||
# output from tput. However in this case, tput detects neither stdout or
|
# output from tput. However in this case, tput detects neither stdout or
|
||||||
# stderr is a tty and so only gives default 80, 24 values
|
# stderr is a tty and so only gives default 80, 24 values
|
||||||
WT_HEIGHT=$(tput lines)
|
WT_HEIGHT=20
|
||||||
WT_WIDTH=$(tput cols)
|
WT_WIDTH=$(tput cols)
|
||||||
|
|
||||||
if [ -z "$WT_HEIGHT" ] || [ "$WT_HEIGHT" -lt 15 ]; then
|
|
||||||
WT_HEIGHT=20
|
|
||||||
fi
|
|
||||||
if [ -z "$WT_WIDTH" ] || [ "$WT_WIDTH" -lt 60 ]; then
|
if [ -z "$WT_WIDTH" ] || [ "$WT_WIDTH" -lt 60 ]; then
|
||||||
WT_WIDTH=80
|
WT_WIDTH=80
|
||||||
fi
|
fi
|
||||||
|
if [ "$WT_WIDTH" -gt 178 ]; then
|
||||||
|
WT_WIDTH=120
|
||||||
|
fi
|
||||||
WT_MENU_HEIGHT=$(($WT_HEIGHT-8))
|
WT_MENU_HEIGHT=$(($WT_HEIGHT-8))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user