X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=opt%2Fbin%2Fbigscreen;h=3f30b9278abb1de55e78211e1c78cf0baf0d37d3;hp=df235b814acc777946ac3627415e6c9c7304b8a2;hb=6b31a2df164c14ef4fb443f6eb617b83b14fd60d;hpb=819bb88d5a014a23150b8fd609d194e883958674 diff --git a/opt/bin/bigscreen b/opt/bin/bigscreen index df235b8..3f30b92 100755 --- a/opt/bin/bigscreen +++ b/opt/bin/bigscreen @@ -6,7 +6,11 @@ # # Resize only if we're at the default size. -if [ "$(tput lines)" = "24" ]; then - usize $(tput cols) 25 -fi +size=$(stty size) +oldcols=${size##* } +oldlines=${size%% *} +lines=${oldlines:-24} + +[ ${lines:-24} -lt 25 ] && lines=25 +[ $lines = $oldlines ] || usize $oldcols $lines exec screen ${1+"$@"}