Ctrl-A m opens a boxed menu with window, pane, session and configuration actions. Items live in static tables, so new entries need no changes to drawing or key handling. Configuration pages set status line position and background, the per-client prefix and the display toggles at runtime; Ctrl-A w opens the window list in the same style.
510 lines
19 KiB
Groff
510 lines
19 KiB
Groff
.TH MURX 1 "November 2026" "murx" "User Commands"
|
|
.SH NAME
|
|
murx \- small persistent terminal multiplexer
|
|
.SH SYNOPSIS
|
|
.B murx
|
|
.RB [ \-p " letter"]
|
|
.RB [ \-s " top|bottom"]
|
|
.RB [ \-c " RRGGBB"]
|
|
.RB [ \-\-cwd ]
|
|
.RB [ \-\-clock ]
|
|
.RB [ \-\-murx ]
|
|
.RB [ \-\-hostname ]
|
|
.RB [ \-\- ]
|
|
.RI [ session ]
|
|
.br
|
|
.B murx
|
|
.BR \-h " | " \-\-help
|
|
.br
|
|
.B murx
|
|
.BR \-l " | " \-\-list\-sessions
|
|
.SH DESCRIPTION
|
|
.B murx
|
|
runs shells and terminal programs in windows and split panes.
|
|
It attaches to the named session, starting a server if necessary.
|
|
The default session name is
|
|
.BR 0 .
|
|
Each session has its own server and Unix socket.
|
|
Detaching leaves programs running; run the same command to reattach.
|
|
The session ends when its last pane exits or its server is killed.
|
|
.PP
|
|
Multiple clients may attach simultaneously and share windows and the active
|
|
pane. Each client has its own prefix, menus, lock and scrollback view.
|
|
There is no configuration file or command language.
|
|
.PP
|
|
Options precede the session name. Names contain 1 to 48 letters, digits,
|
|
hyphens or underscores. Use
|
|
.B \-\-
|
|
before a name beginning with a hyphen.
|
|
.SH OPTIONS
|
|
.TP
|
|
.BR \-l ", " \-\-list\-sessions
|
|
List running sessions for the current user, sorted by name, one per line.
|
|
Checks the runtime socket directory and /tmp fallback, skips stale sockets
|
|
and suppresses duplicate names. No terminal is required and no session is
|
|
created or attached. Prints nothing if no sessions are running.
|
|
Do not supply a session name with this option.
|
|
.TP
|
|
.BR \-p " letter, " \-\-prefix " letter"
|
|
Choose this client's control prefix. Letters a through z are accepted,
|
|
case-insensitively; a means Ctrl-A and x means Ctrl-X.
|
|
The default is Ctrl-A. The old C-x argument syntax is not accepted.
|
|
Repeat this option when reattaching, or set a shell alias.
|
|
Other clients may choose different prefixes.
|
|
.TP
|
|
.BR \-s " top|bottom, " \-\-status " top|bottom"
|
|
Place the status line at the top or bottom.
|
|
New sessions default to top. An explicit choice changes an existing session
|
|
for all clients. Omitting this option preserves the session's position.
|
|
Prompts and messages follow the status line.
|
|
.TP
|
|
.BR \-c " RRGGBB, " \-\-color " RRGGBB"
|
|
Set the session's status bar background for all attached clients.
|
|
Supply six hexadecimal digits, such as 000000 for black.
|
|
Omitting this option preserves the session's color when reattaching. New
|
|
sessions use the terminal's default background unless a color is supplied.
|
|
.TP
|
|
.B \-\-cwd
|
|
Show the current directory at the left of the status line.
|
|
.TP
|
|
.B \-\-clock
|
|
Show the status clock.
|
|
.TP
|
|
.B \-\-murx
|
|
Show the [murx] label at the left of the status line when
|
|
.B \-\-cwd
|
|
is not enabled. The directory takes precedence if both options are supplied.
|
|
.TP
|
|
.B \-\-hostname
|
|
Show the hostname: prefix in window names and the outer terminal title.
|
|
.TP
|
|
.BR \-h ", " \-\-help
|
|
Print usage and keyboard shortcuts, then exit.
|
|
.PP
|
|
These four display features are disabled by default and set a new session's
|
|
values; the Configuration menu can change them in a running session.
|
|
To restore the previous default display, use
|
|
.BR "murx \-\-cwd \-\-clock \-\-hostname session" .
|
|
.SH KEY BINDINGS
|
|
Every binding below starts with the prefix: press Ctrl-A, release it,
|
|
then press the remaining key. Substitute your chosen prefix throughout,
|
|
including both keys of the last-window binding.
|
|
Prefix then a sends the chosen control prefix literally to the pane.
|
|
Doubling the prefix switches to the last window and takes precedence over
|
|
other control-key bindings. With Ctrl-X as prefix, Ctrl-X a sends Ctrl-X,
|
|
Ctrl-X Ctrl-X switches windows and Ctrl-X x locks the client.
|
|
Other Ctrl-A input is passed to the pane when a different prefix is selected.
|
|
|
|
.TP
|
|
.B Ctrl\-A m
|
|
open the main menu.
|
|
The menu has submenus for panes, sessions and configuration;
|
|
Ctrl\-A w opens the window list in the same style.
|
|
.TP
|
|
.B Ctrl\-A a
|
|
send the configured prefix literally to the pane.
|
|
|
|
.TP
|
|
.B Ctrl\-A c, Ctrl\-A Ctrl\-C
|
|
new window.
|
|
|
|
.TP
|
|
.B Ctrl\-A n, Ctrl\-A Space, Ctrl\-A Ctrl\-N, Ctrl\-A Ctrl\-@
|
|
next window.
|
|
|
|
.TP
|
|
.B Ctrl\-A p, Ctrl\-A Ctrl\-P, Ctrl\-A Backspace
|
|
previous window.
|
|
|
|
.TP
|
|
.B Ctrl\-A Ctrl\-A
|
|
last window.
|
|
|
|
.TP
|
|
.B Ctrl\-A w, Ctrl\-A Ctrl\-W, Ctrl\-A "
|
|
window menu (Up/Down, j/k, Enter).
|
|
|
|
.TP
|
|
.B Ctrl\-A A
|
|
temporarily rename window (until the next automatic name refresh).
|
|
|
|
.TP
|
|
.B Ctrl\-A 0 ... Ctrl\-A 9
|
|
select window by its number in the status line.
|
|
|
|
.TP
|
|
.B Ctrl\-A \-
|
|
split top/bottom.
|
|
|
|
.TP
|
|
.B Ctrl\-A |, Ctrl\-A %
|
|
split left/right.
|
|
|
|
.TP
|
|
.B Ctrl\-A h Ctrl\-A j Ctrl\-A k Ctrl\-A l, Ctrl\-A Up/Down/Left/Right
|
|
select pane.
|
|
|
|
.TP
|
|
.B Ctrl\-A Tab / Ctrl\-A Shift\-Tab
|
|
next / previous pane.
|
|
|
|
.TP
|
|
.B Ctrl\-A o
|
|
next pane.
|
|
|
|
.TP
|
|
.B Ctrl\-A Ctrl\-H Ctrl\-A Ctrl\-J Ctrl\-A Ctrl\-K Ctrl\-A Ctrl\-L
|
|
resize pane (8/5/5/8).
|
|
|
|
.TP
|
|
.B Ctrl\-A x, Ctrl\-A Ctrl\-X
|
|
lock the client.
|
|
|
|
.TP
|
|
.B Ctrl\-A Page Up, Ctrl\-A [
|
|
enter scrollback (Page Up also scrolls one page).
|
|
|
|
.TP
|
|
.B Ctrl\-A K
|
|
kill pane (confirm).
|
|
|
|
.TP
|
|
.B Ctrl\-A &
|
|
kill window (confirm).
|
|
|
|
.TP
|
|
.B Ctrl\-A \e
|
|
kill server (confirm).
|
|
|
|
.TP
|
|
.B Ctrl\-A r
|
|
show Configuration Reloaded!.
|
|
|
|
.TP
|
|
.B Ctrl\-A R
|
|
force the session to this client's terminal size.
|
|
|
|
.TP
|
|
.B Ctrl\-A *
|
|
list attached clients.
|
|
|
|
.TP
|
|
.B Ctrl\-A d, Ctrl\-A Ctrl\-D
|
|
detach.
|
|
|
|
.PP
|
|
Directional selection uses pane edges and prefers panes overlapping on the
|
|
perpendicular axis, then the nearest pane in the requested direction.
|
|
Resize steps are eight columns horizontally and five rows vertically.
|
|
Ctrl-A k selects the pane above; Ctrl-A K kills a pane.
|
|
Renaming a window is temporary until the next automatic name refresh.
|
|
Ctrl-A r only displays a message: there is no configuration file to reload.
|
|
.SS Menus, prompts and confirmations
|
|
The main menu offers new windows and panes, closing and renaming, the window
|
|
list, pane selection and resizing, and Session and Configuration submenus.
|
|
Use Up/Down or j/k to move and Enter to select. Left/Right or h/l enter and
|
|
leave submenus; q, Escape, or Ctrl-C closes the menu. Long menus scroll.
|
|
The Configuration submenu sets the status line position and background
|
|
(default, black or grey), the client prefix, display toggles for the directory,
|
|
clock, [murx] label and hostname, and resets display/status defaults (display toggles, status position and
|
|
background). Session
|
|
settings affect all attached clients; the prefix is per-client. Changes take
|
|
effect immediately and are not saved to disk.
|
|
In prompts use Enter to accept, Escape or Ctrl-C to cancel, Backspace or Ctrl-H
|
|
to delete, and Ctrl-U to clear.
|
|
Confirm destructive actions with y, Y or Enter; n, N, Escape or Ctrl-C cancels.
|
|
The client lock is cosmetic: Enter unlocks it without a password.
|
|
.SH SCROLLBACK
|
|
Ctrl-A Page Up freezes the active pane's history and moves up one page.
|
|
Ctrl-A [ opens the view at the current screen.
|
|
Use Page Up and Page Down without a prefix to browse;
|
|
q, Escape, Enter or Ctrl-C returns to live output.
|
|
The usual window shortcuts work in scrollback, including Ctrl-A n, Ctrl-A p,
|
|
Ctrl-A 0 through Ctrl-A 9, a double prefix, and Ctrl-A w for the window chooser.
|
|
Use Ctrl-A c to create a window while browsing.
|
|
Returning to a window restores its scrollback view and position.
|
|
.PP
|
|
Each pane retains up to 2,000 normal-screen history lines in memory.
|
|
Programs keep running while the view is frozen.
|
|
Scrollback views are private to each client and saved per pane while attached.
|
|
Alternate-screen programs such as editors do not add history;
|
|
opening scrollback there shows only their current screen.
|
|
Colors are retained; lines are clipped or padded to the pane width without reflow.
|
|
Text selection and copying are not provided.
|
|
.SH STATUS AND TERMINAL DISPLAY
|
|
With --cwd, the left side shows [/path/to/directory]. With --murx and without
|
|
--cwd, it shows [murx]. By default neither label is shown.
|
|
On Linux the directory follows the
|
|
active pane's foreground process, falling back to its shell and then the
|
|
session's starting directory. Other systems use the starting directory unless
|
|
a shell reports a path. Local HOME paths are abbreviated with ~.
|
|
Long paths end in dots to leave space for the window list and clock;
|
|
the label is hidden if fewer than four columns remain.
|
|
.PP
|
|
The window list is right-aligned. Each entry contains its number and name;
|
|
* marks the current window and a trailing hyphen marks the previous window.
|
|
Names show program for each window's active foreground job,
|
|
or hostname:program with --hostname,
|
|
including inactive windows, and refresh within one second.
|
|
Pipelines use the foreground process group leader's name.
|
|
Returning to the shell restores its name.
|
|
Linux uses /proc; other systems use ps.
|
|
With --clock, the right side shows HH:MM:SS, refreshed every second.
|
|
.PP
|
|
The outer terminal title follows [murx] program, or [murx] hostname:program
|
|
with --hostname. Its [murx] prefix is always present; --murx controls only
|
|
the status label.
|
|
Hostnames are shortened at the first dot.
|
|
Panes have no title rows; only splits have separator lines.
|
|
The status uses colour12, accents colour14 and the current window colour11.
|
|
The current window name turns bright red (colour9) when its active pane's
|
|
foreground process is su or has effective UID 0, including programs launched
|
|
from a root shell. Inactive names retain colour12. The color refreshes within
|
|
one second and returns to yellow for an unprivileged active pane.
|
|
Over SSH the shell must report root status; install the hooks in root's shell
|
|
as well as the regular user's. This is a visual hint, not a security indicator.
|
|
Borders use colour8 on the terminal's default background.
|
|
Messages use foreground colour6 and background colour8.
|
|
Menus use a black background with a colour12 frame, colour11 titles and
|
|
selection, colour14 accents and dim colour8 separators and help text.
|
|
.PP
|
|
UTF-8, wide characters, application cursor keys, 256 colors and alternate
|
|
screens are supported. Output uses 256-color escapes, or truecolor when
|
|
COLORTERM advertises truecolor and TERM does not identify screen, tmux or linux.
|
|
Otherwise truecolor is mapped to the nearest xterm-256 entry.
|
|
.SH SESSION SIZE
|
|
The most recently attached or resized client determines the session size,
|
|
with a minimum of 20 columns and 5 rows.
|
|
Larger clients center the session; smaller clients show its top-left portion.
|
|
Ctrl-A R forces the session to the current client's terminal size.
|
|
Ctrl-A * lists attached clients for size diagnostics.
|
|
.PP
|
|
Terminal size changes are checked every 250 milliseconds as well as on SIGWINCH.
|
|
Resizing does not reflow existing text.
|
|
.SH REMOTE SHELL INTEGRATION
|
|
Enable --hostname to display reported remote hostnames and --cwd to display
|
|
reported directories when creating the session. The hostname examples below
|
|
assume --hostname is enabled.
|
|
.PP
|
|
SSH does not expose remote foreground programs or working directories locally.
|
|
Configure the remote shell to send terminal reports using one of the examples
|
|
below. Reload the shell configuration or open a new SSH shell afterward.
|
|
Restart session servers after upgrading murx to gain newly added features.
|
|
.PP
|
|
OSC 0 or OSC 2 titles of the form hostname:program update the SSH window name.
|
|
Use a hostname containing only letters, digits, dots, underscores or hyphens,
|
|
and a program basename without whitespace, slashes or colons.
|
|
Without a matching report, the name stays local-hostname:ssh.
|
|
Structured remote titles are retained for the SSH job even if a program
|
|
subsequently sends an unstructured title.
|
|
.PP
|
|
Directories may be reported using OSC 7:
|
|
.nf
|
|
ESC ] 7 ; file://host/percent-encoded-path BEL
|
|
.fi
|
|
or using the murx-specific form:
|
|
.nf
|
|
ESC ] 777 ; murx-cwd ; /absolute/path BEL
|
|
ESC ] 777 ; murx-cwd ; ~/relative/to/remote/home BEL
|
|
.fi
|
|
The spaces above separate fields for readability and are not transmitted.
|
|
ESC backslash also terminates an OSC report.
|
|
Standard OSC 7 paths are percent-decoded and displayed as absolute paths;
|
|
the murx-specific form preserves remote ~ abbreviations.
|
|
Reports are associated with the foreground job that sent them.
|
|
Disconnecting SSH restores the local shell's path and name.
|
|
With splits the window and status follow the active pane.
|
|
OSC 777;murx-root;1 reports a root shell and OSC 777;murx-root;0 clears it.
|
|
The report is tied to the foreground SSH job and is ignored after disconnect.
|
|
Remote su command titles also mark the active window red, even before a UID
|
|
report arrives. Remote shells without hooks cannot report their UID.
|
|
Install the matching hook in both the regular user's and root's startup files.
|
|
The examples activate in interactive screen-256color terminals as well as when
|
|
SSH_CONNECTION is set, so su and sudo login shells can report status even if
|
|
they clear the SSH environment. The parent shell clears root status at its
|
|
next prompt after the root shell exits.
|
|
.SS Zsh
|
|
Add the following to ~/.zshrc on the remote host you connect to over SSH.
|
|
The preexec hook reports the first command of a pipeline;
|
|
precmd restores the shell name and reports the directory after cd.
|
|
.nf
|
|
.ft CR
|
|
if [[ \-o interactive && ( \-n $SSH_CONNECTION || $TERM == screen\-256color ) ]]; then
|
|
autoload \-Uz add\-zsh\-hook
|
|
murx_ssh_title() {
|
|
local program=${1:t}
|
|
printf '\e033]2;%s:%s\e007' "${HOST%%.*}" "$program"
|
|
local directory=$PWD
|
|
if [[ $directory == "$HOME" ]]; then
|
|
directory='~'
|
|
elif [[ $directory == "$HOME/"* ]]; then
|
|
directory="~/${directory#"$HOME/"}"
|
|
fi
|
|
printf '\e033]777;murx\-cwd;%s\e007' "$directory"
|
|
printf '\e033]777;murx\-root;%s\e007' "$((EUID == 0))"
|
|
}
|
|
murx_ssh_preexec() {
|
|
local \-a words
|
|
words=(${(z)1})
|
|
murx_ssh_title "${(Q)words[1]}"
|
|
}
|
|
murx_ssh_precmd() { murx_ssh_title zsh; }
|
|
add\-zsh\-hook preexec murx_ssh_preexec
|
|
add\-zsh\-hook precmd murx_ssh_precmd
|
|
fi
|
|
|
|
.ft
|
|
.fi
|
|
.SS Bash
|
|
Add the following to ~/.bashrc on the remote host you connect to over SSH.
|
|
It preserves string and array PROMPT_COMMAND values and avoids duplicate
|
|
installation when sourced again. It installs a DEBUG trap: if an existing
|
|
framework such as bash-preexec already owns that trap, integrate the functions
|
|
with that framework instead of replacing its trap.
|
|
Do not enable function tracing (set -T) for these hooks.
|
|
.nf
|
|
.ft CR
|
|
if [[ $\- == *i* && ( \-n $SSH_CONNECTION || $TERM == screen\-256color ) &&
|
|
\-z ${murx_ssh_installed\-} ]]; then
|
|
murx_ssh_title() {
|
|
local program=$1 directory=$PWD
|
|
program=${program##*/}
|
|
printf '\e033]2;%s:%s\e007' "${HOSTNAME%%.*}" "$program"
|
|
if [[ $directory == "$HOME" ]]; then
|
|
directory='~'
|
|
elif [[ $directory == "$HOME/"* ]]; then
|
|
directory="~/${directory#"$HOME/"}"
|
|
fi
|
|
printf '\e033]777;murx\-cwd;%s\e007' "$directory"
|
|
printf '\e033]777;murx\-root;%s\e007' "$((EUID == 0))"
|
|
}
|
|
murx_ssh_preexec() {
|
|
if [[ ${murx_ssh_ready\-0} == 1 && $1 != murx_ssh_precmd ]]; then
|
|
murx_ssh_ready=0
|
|
local program rest
|
|
read \-r program rest <<< "$1"
|
|
# Strip quotes around a simple command name without evaluating it.
|
|
program=${program#\e"}; program=${program%\e"}
|
|
program=${program#\e'}; program=${program%\e'}
|
|
murx_ssh_title "$program"
|
|
fi
|
|
return 0
|
|
}
|
|
murx_ssh_precmd() {
|
|
local last_status=$?
|
|
murx_ssh_title bash
|
|
murx_ssh_ready=1
|
|
return "$last_status"
|
|
}
|
|
# Keep existing prompt commands, and run our prompt hook last.
|
|
if [[ $(declare \-p PROMPT_COMMAND 2>/dev/null) == 'declare \-a '* ]]; then
|
|
PROMPT_COMMAND+=(murx_ssh_precmd)
|
|
else
|
|
PROMPT_COMMAND=("${PROMPT_COMMAND\-}" murx_ssh_precmd)
|
|
fi
|
|
trap 'murx_ssh_preexec "$BASH_COMMAND"' DEBUG
|
|
murx_ssh_installed=1
|
|
fi
|
|
|
|
.ft
|
|
.fi
|
|
|
|
.PP
|
|
The Bash command name is the first whitespace-delimited word of the first
|
|
simple command. Aliases, assignments, compound commands and quoted executable
|
|
paths containing spaces may display differently from the Zsh hook.
|
|
Command text is never evaluated by these hooks.
|
|
Both examples emit invisible terminal updates rather than visible command lines.
|
|
.SH ENVIRONMENT
|
|
.TP
|
|
.B SHELL
|
|
Login shell started in new panes. If unset or empty, /usr/bin/zsh is used
|
|
when executable, otherwise /bin/sh.
|
|
Panes receive TERM=screen-256color and inherit the server's environment and umask.
|
|
.TP
|
|
.B HOME
|
|
Home directory abbreviated as ~ in locally discovered status paths.
|
|
.TP
|
|
.B XDG_RUNTIME_DIR
|
|
Preferred parent directory for session sockets.
|
|
.TP
|
|
.B TMPDIR
|
|
Socket directory parent if XDG_RUNTIME_DIR is unset or empty;
|
|
/tmp is used if neither is set.
|
|
.TP
|
|
.BR TERM ", " COLORTERM
|
|
Describe the attaching terminal and affect truecolor output.
|
|
.TP
|
|
.B SSH_CONNECTION
|
|
Used by the example shell hooks to enable reporting in remote SSH shells.
|
|
.TP
|
|
.B LC_CTYPE
|
|
Along with the standard locale environment, controls character width handling.
|
|
.SH FILES
|
|
.TP
|
|
.I $XDG_RUNTIME_DIR/murx-<uid>/<session>.sock
|
|
Per-user session socket. If XDG_RUNTIME_DIR is unavailable, the parent comes
|
|
from TMPDIR or /tmp. Long socket paths fall back to /tmp/murx-<uid>/.
|
|
Socket permissions are restricted to the owner.
|
|
.PP
|
|
There is no configuration file and no on-disk scrollback.
|
|
.SH EXAMPLES
|
|
Start or reattach to the default session:
|
|
.PP
|
|
.nf
|
|
murx
|
|
.fi
|
|
.PP
|
|
Use a named session, Ctrl-X prefix and bottom status:
|
|
.PP
|
|
.nf
|
|
murx \-\-prefix x \-\-status bottom work
|
|
.fi
|
|
.PP
|
|
Start a session with a minimal status display:
|
|
.PP
|
|
.nf
|
|
murx minimal
|
|
.fi
|
|
.PP
|
|
Detach with Ctrl-A d (or Ctrl-X d with the alternate prefix), then run the
|
|
same session command to reattach. Exit the last pane's shell to end the session,
|
|
or use the confirmed kill-pane, kill-window or kill-server bindings.
|
|
.SH UPGRADING FROM MOERX
|
|
The executable and manual are now murx and murx(1). Update scripts and aliases,
|
|
and remove the old status-label disabling option. The label is now disabled
|
|
by default; use \fB\-\-murx\fR to enable it.
|
|
Sessions use a separate murx-<uid> socket directory and are not migrated.
|
|
Finish existing sessions with the old executable before removing it.
|
|
Replace optional remote shell hooks and reload the remote shell;
|
|
custom OSC reports now use murx-cwd and murx-root.
|
|
.SH EXIT STATUS
|
|
.TP
|
|
.B 0
|
|
Normal client exit, including detaching, successful help output or session
|
|
listing (including an empty list).
|
|
.TP
|
|
.B 1
|
|
Unable to start or attach to a session, client terminal setup failed, or
|
|
a session directory could not be read while listing.
|
|
.TP
|
|
.B 2
|
|
Invalid command-line options or session name.
|
|
.PP
|
|
This is the client's status, not the exit status of programs running in panes.
|
|
.SH LIMITATIONS
|
|
No configuration file, command prompt, scripting interface, plugins, pane zoom,
|
|
activity monitoring, clock mode or scrollback copying is provided.
|
|
Mouse reporting is not negotiated with the outer terminal.
|
|
The lock screen is not a security mechanism.
|
|
New windows and panes start in the server's original working directory,
|
|
not the active pane's current directory.
|
|
There is one resize step per key press, without a dedicated repeat mode.
|
|
At most 60 panes may be created in a window.
|
|
Killing a server affects only its own named session.
|
|
.SH AUTHORS
|
|
Armin Jenewein and Johannes Findeisen.
|
|
.SH SEE ALSO
|
|
.BR bash (1),
|
|
.BR ssh (1),
|
|
.BR zsh (1)
|