13d222369SConrad Meyer.\" resizewin 23d222369SConrad Meyer.\" 33d222369SConrad Meyer.\" Query terminal for size and inform the kernel 43d222369SConrad Meyer.\" 53d222369SConrad Meyer.\" Copyright 2015 EMC / Isilon Storage Division 63d222369SConrad Meyer.\" 73d222369SConrad Meyer.\" Redistribution and use in source and binary forms, with or without 83d222369SConrad Meyer.\" modification, are permitted provided that the following conditions 93d222369SConrad Meyer.\" are met: 103d222369SConrad Meyer.\" 1. Redistributions of source code must retain the above copyright 113d222369SConrad Meyer.\" notice, this list of conditions and the following disclaimer. 123d222369SConrad Meyer.\" 2. Redistributions in binary form must reproduce the above copyright 133d222369SConrad Meyer.\" notice, this list of conditions and the following disclaimer in the 143d222369SConrad Meyer.\" documentation and/or other materials provided with the distribution. 153d222369SConrad Meyer.\" 163d222369SConrad Meyer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 173d222369SConrad Meyer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 183d222369SConrad Meyer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 193d222369SConrad Meyer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 203d222369SConrad Meyer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 213d222369SConrad Meyer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 223d222369SConrad Meyer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 233d222369SConrad Meyer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 243d222369SConrad Meyer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 253d222369SConrad Meyer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 263d222369SConrad Meyer.\" SUCH DAMAGE. 2736acabc1SBaptiste Daroussin.\" 283d222369SConrad Meyer.\" $FreeBSD$ 293d222369SConrad Meyer.\" 30*f1504c0cSEdward Tomasz Napierala.Dd May 8, 2017 313d222369SConrad Meyer.Dt RESIZEWIN 1 323d222369SConrad Meyer.Os 333d222369SConrad Meyer.Sh NAME 343d222369SConrad Meyer.Nm resizewin 353d222369SConrad Meyer.Nd update the kernel window size for the current TTY 36*f1504c0cSEdward Tomasz Napierala.Sh SYNOPSIS 37*f1504c0cSEdward Tomasz Napierala.Nm 38*f1504c0cSEdward Tomasz Napierala.Op Fl z 393d222369SConrad Meyer.Sh DESCRIPTION 403d222369SConrad MeyerQuery the terminal emulator window size with the 413d222369SConrad Meyer.Dv TIOCSWINSZ 423d222369SConrad Meyerioctl and set the window size known by the kernel to the new values. 433d222369SConrad MeyerThe terminal is assumed to be VT100/ANSI compatible. 44*f1504c0cSEdward Tomasz Napierala.Pp 45*f1504c0cSEdward Tomasz NapieralaThe following options are available: 46*f1504c0cSEdward Tomasz Napierala.Bl -tag -width ".Fl z" 47*f1504c0cSEdward Tomasz Napierala.It Fl z 48*f1504c0cSEdward Tomasz NapieralaDo nothing unless the current kernel terminal size is zero. 49*f1504c0cSEdward Tomasz Napierala.El 50*f1504c0cSEdward Tomasz Napierala.Pp 513d222369SConrad Meyer.Nm 523d222369SConrad Meyeris functionally similar to 533d222369SConrad Meyer.Xr resize 1 , 543d222369SConrad Meyerwhich is part of the 553d222369SConrad Meyer.Xr xterm 1 563d222369SConrad Meyerdistribution. 573d222369SConrad MeyerHowever, 583d222369SConrad Meyer.Nm 593d222369SConrad Meyeronly works with VT100/ANSI-compatible terminals and does 603d222369SConrad Meyernot emit commands to set environment variables. 613d222369SConrad Meyer.Pp 623d222369SConrad MeyerAfter a terminal window has been resized, running 633d222369SConrad Meyer.Nm 643d222369SConrad Meyerupdates the kernel's window size to match the new size. 653d222369SConrad Meyer.Pp 663d222369SConrad MeyerNote that virtually all modern terninals support VT100/ANSI escape 673d222369SConrad Meyersequences, including xterm, konsole, gnome-terminal iTerm, 682dc39caaSKurt LidlTerminal.app, and PuTTY. 693d222369SConrad Meyer.Sh SEE ALSO 703d222369SConrad Meyer.Xr resize 1 , 713d222369SConrad Meyer.Xr stty 1 723d222369SConrad Meyer.Sh HISTORY 732dc39caaSKurt LidlThe 743d222369SConrad Meyer.Nm 752dc39caaSKurt Lidlcommand first appeared in 762dc39caaSKurt Lidl.Fx 11 . 77