esc(1) - [NCURSES] set xterm(1) attributes using a screen or line mode (LICENSE:PD)
Synopsis
Description
Options
Variables
Example
Author
License
esc [keywords] -rows NN -cols NN -right NN -down NN -fn fontname -fsize fontsize -bg background_color -fg foreground_color -cr cursor_color -cn [0 COLOR_VALUE 1 COLOR_VALUE 2 COLOR_VALUE ...|] -o windowname -title TITLE window title -name TITLE icon name -nt TITLE icon name and title -xrdb [NAME] -iconstate -alias --help --version
If no values are specified on the command line a screen interface is displayed that allows setting the background, foreground, cursor color, font size, and window size of an xterm(1) terminal emulator window using ncurses(3f)/fixedform(3f).If options are specified on the command line the values are set and the screen mode is not launched.
If the positioning and resize options do not work, run the following before starting a new xterm:
esc -xrdb |xrdb -mergeIf you use something that filters stdout such as tmux(1), screen(1) assign esc(1) output to the initial stdout before starting the program, such as
export OTHERTTY=tty tmux
VALUES The allowed keywords are:
o 80........ set terminal width to eighty characters o 132....... set terminal width to 132 characters o raise..... raise to top of window stack o lower..... lower to back of window stack o iconify... iconify window o uniconify. uniconify window o toggle.... toggle icon state o maximize.. make xterm(1) window size of display o restore... restore window size to before the last "maximize" o vt102..... switch to VT102 terminal emulator mode o tek....... switch to Tektronix 4010 terminal emulator mode -rows NN change number of rows of window to specified value -cols NN change number of columns of window to specified value -right NN distance in rasters from left display edge to place upper left corner -down NN distance in rasters from upper display edge to place upper left corner -fn FONTNAME change to specified font name. You can list several available fixed-space font names by using: (xlsfonts -fn *-c-* ; xlsfonts -fn *-m-*)Example names: (font names may vary from server to server):
fixed 8x13 9x15 *24*-c-*
-fsize NN guess at a fixed font of specified size -bg CNAME specify background color by name or hex value "#RRGGBB" -fg CNAME specify foreground color by name or hex value "#RRGGBB" -cr CNAME specify cursor color by name or hex value "#RRGGBB" -cn NN CNAME... define terminal pen colors by number "NN $RRGGBB" or name. Typically, at least 0 thru 15 are supported. -title TITLE window title -name TITLE icon name -nt TITLE icon name and title --alias list some common bash shell aliases that use esc(1). These are typically added to the ~/.bashrc file or sourced: esc -alias >./junk;source ./junk;rm ./junk;alias
-o WINDOWNAME If your window manager supports multiple virtual displays by defining the property WM_OCCUPANCY (use xprop -id $WINDOWID to see) then you can move your windows to specific virtual displays; usually by number or by name. The name "all" is typically special and makes the window visible in all the virtual displays. This works for the ctwm(1) window manager.
If your window manager has assigned the property WS_OCCUPATION as seen by entering
xprop -id $WINDOWID : WM_OCCUPATION(STRING) = "2" WM_OCCUPATION(STRING) = "Two" :you can specify which virtual display to display on.
--iconstate | |||||||||||||||
return current icon state of X11 xterm window (opened or
closed).
-fn -bg -fg -cr -rows -cols -down -right -iconstate -cn |0 1 2 ... By itself, -cn will list the first 16 pen colors. Given a list of numbers, it will query those specific pen numbers. | |||||||||||||||
By default esc(1) writes output to the current stdout file. The environment variable OTHERTTY can be used to change the default file. This is commonly required before starting programs that filter stdout, such as tmux(1) and screen(1).
export OTHERTTY=/dev/pts/1
Sample usage:
# if do not have xterm settings set might need to enter esc -xrdb|xrdb -merge # and then try the commands in xterm(1) windows launched after thisesc # bring up screen interface esc -fn *--14*-c-* # find a font of specified size esc -fn 5 # set to fifth font in font menu (ctrl-Mouse2) esc -fsize 20 # set to first 20-point font found (if any) esc -rows 40 -cols 132 # set terminal size esc -bg brown -fg white -cr red esc -bg #ff00ff esc -cn 0 red 1 green 2 cyan esc -alias >x;source x;rm x # set up a lot of bash shell aliases
# set up X11 resources so name BROWN sets some favorite defaults esc -bg brown -fg black -fn 5 -xrdb BROWN >>$HOME/.Xdefaults xrdb -merge $HOME/.Xdefaults xterm -name BROWN
C-shell
alias cd cd \!*; esc -nt
John S. Urban
Public Domain
Nemo Release 3.1 | esc (1) | February 23, 2025 |