In addition to the Motif window manager (mwm), the following commands are also useful in managing windows:
resize
xrefresh
resize
The resize
command resets the tty's size information and
displays a command which you can use in your shell to define the value of
the TERMCAP
environment variable (which contains window length
and width information). This enables a shell to reflect the current size of
its window.
Do not confuse resize
, the command, with the window manager
function f.resize
. The f.resize
function changes the
size of a window, but does not reset any environment variables. The resize
command, on the other hand, does not change the size of a window,
but it does reset the tty's window size information and displays a command
that can be used to reset the TERMCAP
environment variable. Resetting
this tty size information and/or the TERMCAP
environment variable
enables character-cell programs to adjust their output to the window's new
size.
resize
Use resize
when you notice that a character-cell program
or shell does not seem to be using correct window size information.
Usually, it is not necessary to use the resize
command. Terminal
emulators, ttys, and shells use escape sequences, system calls, and signals
to communicate window size information, and they automatically keep this information
up-to-date, reflecting any changes in the window size. Using resize
may be necessary when using older implementations of rlogin
or telnet
, or LAT
connections from an xterm
or DECterm. The resize
command may also be useful when using an
ordinary video terminal with a screen size other than 24×80.
After you have resized a window, either by dragging the window frame
or by choosing Size from the window menu, you can reset the TERMCAP
environment variable to reflect the new window size by issuing
the following command:
%
eval `resize`
C.2 Repainting the Screen with xrefresh
The xrefresh
client repaints the screen or a specified portion
of the screen. This client performs a similar task to the f.refresh
window manager function. However, the xrefresh
client,
because of its options, is more versatile.
C.2.1 When to Use xrefresh
Occasionally, an X program might not clean up properly after itself,
leaving graphics litter on the screen. Use xrefresh
any time you
want X to redisplay everything on the screen (or on a portion of the screen).
To use xrefresh
, execute it from the command line of any
terminal window. To repaint just a portion of the screen, use the -geometry
option.
C.2.2 Examples
The following command repaints the entire display:
xrefresh
This command repaints a portion of the display in the upper-left corner:
xrefresh -white -geometry 400x200+1+1