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.\" 30df2a34c0SEdward Tomasz Napierala.Dd May 9, 2017 313d222369SConrad Meyer.Dt RESIZEWIN 1 323d222369SConrad Meyer.Os 333d222369SConrad Meyer.Sh NAME 343d222369SConrad Meyer.Nm resizewin 35df2a34c0SEdward Tomasz Napierala.Nd update terminal size 36f1504c0cSEdward Tomasz Napierala.Sh SYNOPSIS 37f1504c0cSEdward Tomasz Napierala.Nm 38f1504c0cSEdward Tomasz Napierala.Op Fl z 393d222369SConrad Meyer.Sh DESCRIPTION 40df2a34c0SEdward Tomasz NapieralaThe 41df2a34c0SEdward Tomasz Napierala.Nm 42df2a34c0SEdward Tomasz Napieralautility 43df2a34c0SEdward Tomasz Napieralaqueries the terminal emulator for the current window size and updates 44df2a34c0SEdward Tomasz Napieralathe size known to the kernel using the 453d222369SConrad Meyer.Dv TIOCSWINSZ 46df2a34c0SEdward Tomasz Napieralaioctl. 47f1504c0cSEdward Tomasz Napierala.Pp 48f1504c0cSEdward Tomasz NapieralaThe following options are available: 49f1504c0cSEdward Tomasz Napierala.Bl -tag -width ".Fl z" 50f1504c0cSEdward Tomasz Napierala.It Fl z 51f1504c0cSEdward Tomasz NapieralaDo nothing unless the current kernel terminal size is zero. 52df2a34c0SEdward Tomasz NapieralaThis is useful when run from user's profile (shell startup) scripts: 53df2a34c0SEdward Tomasz Napieralaquerying the window size is required for serial lines, but not when 54df2a34c0SEdward Tomasz Napieralalogging in over the network, as protocols like TELNET or SSH already 55df2a34c0SEdward Tomasz Napieralahandle the terminal size by themselves. 56f1504c0cSEdward Tomasz Napierala.El 57f1504c0cSEdward Tomasz Napierala.Pp 58df2a34c0SEdward Tomasz NapieralaAfter a terminal window has been resized, running 59df2a34c0SEdward Tomasz Napierala.Nm 60df2a34c0SEdward Tomasz Napieralaupdates the kernel's window size to match the new size. 61df2a34c0SEdward Tomasz Napierala.Pp 623d222369SConrad Meyer.Nm 633d222369SConrad Meyeris functionally similar to 643d222369SConrad Meyer.Xr resize 1 , 653d222369SConrad Meyerwhich is part of the 663d222369SConrad Meyer.Xr xterm 1 673d222369SConrad Meyerdistribution. 683d222369SConrad MeyerHowever, 693d222369SConrad Meyer.Nm 70*50bc66f4SEdward Tomasz Napieralaonly works with VT100/ANSI-compatible terminals and does not emit 71*50bc66f4SEdward Tomasz Napieralacommands to set environment variables. 723d222369SConrad Meyer.Pp 73df2a34c0SEdward Tomasz NapieralaThe terminal is assumed to be VT100/ANSI compatible. 74df2a34c0SEdward Tomasz NapieralaThe VT100/ANSI escape sequences are supported by virtually all modern 75df2a34c0SEdward Tomasz Napieralaterminals; this include xterm, konsole, gnome-terminal, iTerm, 762dc39caaSKurt LidlTerminal.app, and PuTTY. 773d222369SConrad Meyer.Sh SEE ALSO 78df2a34c0SEdward Tomasz Napierala.Xr stty 1 , 79df2a34c0SEdward Tomasz Napierala.Xr tty 4 803d222369SConrad Meyer.Sh HISTORY 812dc39caaSKurt LidlThe 823d222369SConrad Meyer.Nm 832dc39caaSKurt Lidlcommand first appeared in 84df2a34c0SEdward Tomasz Napierala.Fx 11.0 . 85