set status_format
Synopsis
/set status_format [<text>]
/set -status_format
Defines the appearance of the single-line status bar: time, window identity, channel and modes, query target, and other information. With no text, set displays the format. Unsetting removes its format text; it does not remove the window's status-row allocation.
The compiled default begins with a reverse-video control character followed by:
%T [%R] %*%=%@%N%#%S%{1}H%H%B%Q%A%C%+%I%O%M%F%L %D %U %W
The retired %L and %D fields in that default insert nothing in EPIC6. Startup scripts can modify the format. Reverse video is not automatically applied to every custom format; include a reverse-video control character if wanted.
Syntax of status expandos
Literal text is copied, and percent fields insert status values. Fields are case-sensitive even though command and setting names are not. %C and %{0}C are equivalent: %{map}key selects a numeric map and one character. %% inserts a literal percent sign. Unknown map/key combinations are consumed without a replacement.
The compiler accepts at most 40 recognized fields per line; later fields are skipped. Literal and expanded text also have internal buffer and screen-width limits. Keep formats compact rather than treating them as unlimited strings.
Some fields insert a setting directly. Others use a wrapper setting: the first corresponding percent field in that wrapper is replaced with the actual value. For example:
/set status_query (Query: %Q)
Then %Q in the outer format supplies (Query: alice) while querying Alice. Wrappers do not recursively interpret arbitrary status fields. Dollar variables and function calls require status_does_expandos; preserve dollar signs on assignment when deferring their evaluation.
Standard fields
“Current” below means the input window of each screen, unless show_status_all is on. Other field-specific conditions still apply.
| Field | Value or controlling setting |
|---|---|
%A |
status_away when that window's server has an away message. Current-only when exactly one server is connected. |
%B |
Unseen/held row count through status_hold_lines, rounded down to the window's hold interval; empty until a positive interval is reached. |
%C |
Current channel through status_channel, subject to private-channel hiding and channel-name width. |
%E |
Window's active activity-format expansion, if an activity is selected. |
%F |
Notified-window refnums through status_notify, current-only. |
%G |
Server's advertised NETWORK name, or Unknown. |
%H |
status_hold when held or scrollback distance extends beyond display height. |
%I, %O |
status_insert or status_overwrite, according to insert mode, current-only. |
%K |
status_scrollback while browsing scrollback. |
%M |
status_mail text directly. Mail checking and updates are supplied separately by scripts. |
%N |
Window's server nickname through status_nickname; not current-only. |
%P |
Internal display-position diagnostics; not a stable script interface. |
%Q |
Query target through status_query, when present. |
%R |
Window name, or user-visible refnum if unnamed. |
%S |
Server alias, falling back to configured server name, through status_server. Hidden when exactly one server is connected. |
%T |
Cached clock through status_clock, when clock is on; current-only. |
%U, %X, %Y, %Z |
status_user, status_user1, status_user2, status_user3; current-only. |
%V |
EPIC version string, current-only. |
%W |
status_window on the actual current window when its screen has multiple visible windows. |
%# |
User modes through status_umode; current-only when exactly one server is connected. |
%* |
status_oper for an IRC operator; current-only when exactly one server is connected. |
%+ |
Current channel modes and arguments through status_mode, empty when no mode text exists. |
%. |
Per-window status_special text. |
%= |
status_voice when voiced but not a channel operator. |
%@ |
status_chanop, or status_halfop as a fallback. |
%\| |
status_ssl_on or status_ssl_off, according to the window's server connection. |
%> |
Starts the right-aligned section; see alignment below. |
Additional maps
| Field | Difference from the standard field |
|---|---|
%{1}F |
Uses notify name, then window name, then refnum for notified windows; current-only. |
%{1}H |
status_holdmode when hold mode is on and both held and scrollback distances are less than display height. |
%{1}K |
Scrollback position text (Scroll: distance of total) while in scrollback. |
%{1}P |
Current/noncurrent status prefix, using per-window overrides or global prefix settings. |
%{2}P |
Sequence-point diagnostic through status_sequence_point, only with sequence-point debugging enabled. |
%{1}R |
Numeric user-visible window refnum, even if named. |
%{1}S |
Server alias/name without the single-server hiding rule. |
%{2}S |
Full configured server name. |
%{3}S |
Server group, falling back to configured name. |
%{4}S |
Server-reported name, falling back to configured name. |
%{5}S |
Connection-state string, or Unknown; no status_server wrapper. |
%{1}T |
Literal TEST, not a clock. |
%{1}W |
status_noswap when the window is not swappable. |
%{2}W |
status_window on every window. |
%{3}W |
status_window on the actual current window, even with only one visible window. |
%{1}+ |
Channel-mode wrapper even when its mode text is empty, provided the window has a server. |
%{2}+ |
Mode letters without arguments; empty if no mode text exists. |
%{3}+ |
Mode letters without arguments, allowing an empty mode value. |
Server fields return No Server when no server is associated, except that plain %S first applies its single-connected-server hiding rule. Current-window markers and prefixes use the actual input window, independent of show_status_all.
User-defined fields
%0 through %9 insert status_user through status_user9. %{1}0 through %{1}9 insert status_user10 through status_user19. These are current-only. Maps 2 and 3 similarly select status_user20 through status_user39, but display independently of that restriction. %U/%X/%Y/%Z are aliases for the first four values, not separately configurable fields.
Alignment and repeated fill
%> separates left and right sections. The right section is placed against the right edge when it fits; oversized content is cropped to the available width. The last printable character in the left section is used to fill remaining space, including the gap before a right section. End that section with a space, or enable status_no_repeat, to use spaces instead. Formatting attributes do not themselves become fill characters.
Double and per-window formats
With window double on, the top and bottom status rows use status_format1 and status_format2, respectively, instead of this single-row format. Per-window status_format, status_format1, and status_format2 override the matching global defaults. Changing a global format recompiles status lines and requests updates, while defined per-window overrides remain authoritative.
Examples
A compact single-row format:
/set status_format [%R] %=%@%N%C%+%Q%A %>%T
The space before %> supplies space fill, and the clock is right-aligned. Existing status text settings control the individual wrappers and separators.
A double-row configuration:
/set status_format1 [%R] %N%C%+%Q%A %>%T
/set status_format2 %W %U %X %Y %Z
/window double on
Fields can be empty because their conditions are unmet; these commands do not enable a clock, join channels, or create mail information.
Source references
source/status.c: expando table,build_status_format, wrapper conversion, per-window inheritance, field implementations, contextual expansion, and width/fill layout.source/vars.candinclude/config.h: registration, rebuild callback, and compiled formats.source/window.c: per-window formats, status-row count, and window state.