xtset(1) BSD General Commands Manual xtset(1)NAMExtset — Set title text for xterm
SYNOPSISxtset [-i] [-t] text
DESCRIPTIONxtset writes an xterm ``set title text'' command sequence based on the
text argument to stdout. If the TERM environment variable does not start
with xterm, xtset does nothing.
OPTIONS
-t Set the title only.
-i Set the icon name only.
By default, xtset sets both the title and the icon name.
METAVARIABLES
A number of metavariables allow substituting environmental information:
%h is replaced by the hostname, excluding domain name.
%H is replaced by the hostname, including domain name if gethostname
returns it.
%d is replaced by the current directory name.
is replaced by the current directory name, only last part (unless
this is src, man, doc, etc., in which case the previous part is
included as well).
%u is replaced by the current user name.
%g is replaced by the current group name.
is replaced by the current real user name.
%G is replaced by the current real group name.
%m is replaced by the octal current umask.
%e is replaced by the value of environment variable XTXTRA or null
string.
%t is replaced by the complete name of the stdin terminal, if it is
a terminal.
%T is replaced by the last part of the stdin file name, if it is a
terminal.
%% is replaced by the real percent sign.
ENVIRONMENT
Uses the TERM and XTXTRA variables.
FILESxtset always writes to stdout.
EXAMPLESxtset-i Foo
will expand to
Foo
but only on the icon. The title will remain unchanged.
xtset %d@%h (%u:%g)
might expand to
/home/sol/msmith@rheya (msmith:group2)"
xtset-t %u (%T) %h:%D
xtset-i %u@%h:%D
might set the title text to
root (ttyp0) myhost:usr/src
and the icon text to
root@myhost:usr/src
AUTHORS
Written by Martin Smith <msmith@lssec.bt.co.uk>. Modifications by Greg
Lehey <grog@FreeBSD.org>
BSD March 9, 2001 BSD