st.1
Run a simple terminal emulator
TLDR
Open a terminal
Open a terminal with a specific title
Open a terminal, execute a given command, and write the output to a file
Increase/decrease the font size
Copy/paste from the clipboard
SYNOPSIS
st [-a] [-c class] [-f font] [-g geometry] [-n name] [-o file] [-T title] [-v] [command [arguments ...]]
PARAMETERS
-v
Prints the version information to standard output and exits.
-a
Prevents scrolling to the bottom on new input when using the alternate screen buffer.
-c class
Sets the X window class property (WM_CLASS) for the terminal window.
-f font
Specifies a comma-separated list of fonts to use. Note: default fonts are often hardcoded in config.h and may override or be overridden by this option depending on the build.
-g geometry
Sets the initial size and position of the terminal window (e.g., 80x24+0+0).
-n name
Sets the X window instance name property (WM_NAME) for the terminal window.
-o file
Redirects all terminal output (including command output) to the specified file.
-T title
Sets the initial title of the terminal window. This can often be changed by applications running inside the terminal.
-w windowid
Embeds the terminal window inside an existing window identified by windowid.
command [arguments ...]
Executes the specified command with its arguments instead of the default shell.
DESCRIPTION
st, short for simple terminal, is a free and open-source terminal emulator for the X Window System, developed by the suckless.org community. Adhering to the suckless philosophy, it prioritizes minimalism, efficiency, and a small codebase.
Unlike most terminal emulators, st is primarily configured by editing its C source file, config.h, and then recompiling the program, rather than through runtime command-line options or external configuration files. This design choice offers profound customization and high performance at the cost of requiring the user to compile it for any changes. By default, st offers core features like UTF-8 and 256-color support. Many advanced functionalities, such as scrollback, ligatures, and advanced clipboard handling, are typically added by applying patches to the source code before compilation. It is favored by users who seek a highly optimized, resource-efficient, and fully controllable terminal environment.
CAVEATS
The primary method of configuring st is by editing its config.h file and recompiling. Many features common in other terminal emulators (like scrollback, tab support, or advanced copy-paste) are not built-in by default and require applying various patches to the source code. This approach makes st highly customizable but also demands familiarity with compilation and patching processes, differing significantly from runtime configuration methods.
CONFIGURATION VIA <I>CONFIG.H</I>
st's unique configuration model involves editing the config.h file, a C header, which defines colors, fonts, keybindings, and other behaviors. After making changes, the user must recompile and reinstall st for them to take effect. This method ensures that the final executable is tailored precisely to the user's preferences, leading to a lightweight and efficient program without the overhead of parsing configuration files at runtime.
ADDING FUNCTIONALITY WITH PATCHES
Many advanced features not present in the default st distribution, such as scrollback history, support for font ligatures, clipboard integration, or transparency, are available as community-contributed 'patches'. These are small diff files that modify the source code. Users apply these patches to their st source tree and then recompile, effectively building a customized version of st with their desired functionalities. The suckless website hosts a variety of these patches.
HISTORY
st was developed by the suckless.org community as part of their suite of minimalist tools, which also includes the dwm window manager and dmenu application launcher. It emerged from a desire for a terminal emulator that adhered strictly to the Unix philosophy – doing one thing well, with a minimal, auditable, and high-performance codebase. Its development emphasizes simplicity and control, offering a highly optimized and secure environment by moving most configuration to compile-time decisions rather than runtime options.


