2026-11-17 03:06:45 +01:00
|
|
|
|
# murx
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
2026-11-23 11:47:31 +01:00
|
|
|
|

|
2026-11-23 10:55:09 +01:00
|
|
|
|
|
2026-10-29 18:12:34 +01:00
|
|
|
|
A deliberately small terminal multiplexer. One C file, no config file, no
|
|
|
|
|
|
dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
2026-11-17 11:08:16 +01:00
|
|
|
|
make
|
2026-11-17 03:06:45 +01:00
|
|
|
|
./murx # session "0"
|
|
|
|
|
|
./murx work # separate named session
|
2026-11-17 06:57:40 +01:00
|
|
|
|
./murx 1 # separate numbered session
|
2026-11-17 03:06:45 +01:00
|
|
|
|
./murx -p x work # use Ctrl-X as this client's prefix
|
|
|
|
|
|
./murx --prefix x work # same as -p x
|
|
|
|
|
|
./murx -s bottom work # show the session status line at the bottom
|
|
|
|
|
|
./murx --status bottom work # same as -s bottom
|
2026-11-19 09:42:53 +01:00
|
|
|
|
./murx --cwd work # show the current directory in the status bar
|
|
|
|
|
|
./murx --murx work # show [murx] on the left of the status bar
|
2026-11-20 03:01:53 +01:00
|
|
|
|
./murx -c 191a1c work # use a grey status bar background
|
2026-11-23 11:39:43 +01:00
|
|
|
|
./murx --history 10000 work # keep up to 10,000 history lines per pane
|
2026-11-19 09:42:53 +01:00
|
|
|
|
./murx --clock work # show the status bar clock
|
|
|
|
|
|
./murx --hostname work # show the hostname: prefix in window titles
|
2026-11-23 11:39:43 +01:00
|
|
|
|
./murx --pane-titles work # show a title row above each pane
|
2026-11-17 03:06:45 +01:00
|
|
|
|
./murx -l, --list-sessions # list running sessions without attaching
|
2026-11-21 12:16:50 +01:00
|
|
|
|
./murx --help # version, usage and all shortcuts
|
2026-11-23 08:46:51 +01:00
|
|
|
|
./murx -v, --version # print the version and exit
|
2026-10-29 18:12:34 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
Detach with `Ctrl-A d`. Run `murx` again to reattach.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
Use `murx -l` or `murx --list-sessions` to list running sessions, sorted by
|
2026-11-16 04:30:33 +01:00
|
|
|
|
name, one per line. Listing works without a terminal and does not create or
|
2026-11-22 04:04:58 +01:00
|
|
|
|
attach to a session. It checks the current user's preferred socket directory
|
|
|
|
|
|
(`$XDG_RUNTIME_DIR/murx-<uid>/`, `$TMPDIR/murx-<uid>/`, or `/tmp/murx-<uid>/`)
|
|
|
|
|
|
and the `/tmp` fallback, skips stale sockets, and prints nothing when no
|
|
|
|
|
|
sessions are running. Do not pass a session name with this option. Use
|
|
|
|
|
|
`murx name` to attach to a listed session.
|
2026-11-16 04:30:33 +01:00
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
The [murx(1) manual](murx.1) covers all options, shortcuts, session behavior,
|
|
|
|
|
|
and remote shell setup. Read it locally with `man ./murx.1`. Run
|
|
|
|
|
|
`make install` to install both the program and manual, then use `man murx`.
|
2026-11-16 01:23:23 +01:00
|
|
|
|
The default prefix is `/usr/local`; override `PREFIX`, `BINDIR` or `MANDIR`
|
|
|
|
|
|
as needed. `DESTDIR` supports staged installs, and `make uninstall` removes
|
|
|
|
|
|
the installed program and manual.
|
|
|
|
|
|
|
2026-11-15 06:28:29 +01:00
|
|
|
|
Every shortcut is a chain that starts with the prefix (by default `Ctrl-A`):
|
|
|
|
|
|
press it, release it, then press the rest of the chain.
|
|
|
|
|
|
|
2026-11-15 23:34:12 +01:00
|
|
|
|
Use `-p x` or `--prefix x` to choose Ctrl-X instead; `--prefix` is the long
|
|
|
|
|
|
form of `-p`. Letters `a` through `z` select Ctrl-A through Ctrl-Z,
|
|
|
|
|
|
case-insensitively. The choice applies to this attached client; use the option
|
|
|
|
|
|
again when reattaching, or set a shell
|
2026-11-17 03:06:45 +01:00
|
|
|
|
alias such as `alias murx='murx -p x'`. Clients attached to the same session
|
2026-11-15 06:28:29 +01:00
|
|
|
|
can choose different prefixes.
|
|
|
|
|
|
|
2026-11-15 23:24:20 +01:00
|
|
|
|
With `-p x`, detach with `Ctrl-X d`, send a literal Ctrl-X with `Ctrl-X a`,
|
2026-11-15 06:28:29 +01:00
|
|
|
|
and switch to the last window with `Ctrl-X Ctrl-X`. Doubling the prefix takes
|
|
|
|
|
|
priority over any other control-key binding; `Ctrl-X x` still locks the client.
|
|
|
|
|
|
Ctrl-A is sent straight to the pane. All tables below show the default prefix;
|
|
|
|
|
|
replace it with your chosen key. When upgrading from a version without this
|
|
|
|
|
|
option, restart the session server once so it understands the prefix setting.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
2026-11-15 23:28:53 +01:00
|
|
|
|
Use `-s top` or `-s bottom` (also `--status top|bottom`) to choose the status
|
|
|
|
|
|
line position. New sessions default to top. An explicit choice also updates an
|
|
|
|
|
|
existing session for all attached clients; omitting the option preserves its
|
|
|
|
|
|
position. Prompts and messages follow the status line. Restart servers from
|
|
|
|
|
|
older versions once before using this option.
|
|
|
|
|
|
|
2026-11-19 09:42:53 +01:00
|
|
|
|
Use `--cwd` to show the current directory on the left of the status bar,
|
|
|
|
|
|
and `--clock` to show the clock on the right. Use `--murx` to show `[murx]`
|
|
|
|
|
|
on the left when `--cwd` is not enabled; the directory takes precedence if
|
|
|
|
|
|
both are supplied. Use `--hostname` to show the `hostname:` prefix in window
|
2026-11-22 05:30:22 +01:00
|
|
|
|
names and the outer terminal title. These display options are disabled by
|
2026-11-23 11:39:43 +01:00
|
|
|
|
default. Use `--pane-titles` to show the title row above each pane. These
|
|
|
|
|
|
options set the initial values for a new session. The `Configuration...` menu
|
|
|
|
|
|
can change them in a running session (see [Menu](#menu)). To restore the
|
|
|
|
|
|
previous default display, use
|
2026-11-19 09:42:53 +01:00
|
|
|
|
`murx --cwd --clock --hostname session`.
|
2026-11-16 00:24:44 +01:00
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
## Upgrading from moerx
|
|
|
|
|
|
|
|
|
|
|
|
The executable, source and manual are now `murx`, `murx.c` and `murx.1`.
|
2026-11-19 09:42:53 +01:00
|
|
|
|
Update aliases and scripts to use `murx`. The status label is now disabled
|
|
|
|
|
|
by default; use `--murx` to enable it. Sessions use a separate `murx-<uid>` socket directory; finish
|
2026-11-17 03:06:45 +01:00
|
|
|
|
existing sessions with the old executable before removing it. Existing
|
|
|
|
|
|
sessions are not migrated automatically. Replace the optional remote SSH
|
|
|
|
|
|
hooks below and reload the remote shell: custom reports now use `murx-cwd`
|
|
|
|
|
|
and `murx-root`.
|
|
|
|
|
|
|
2026-10-29 18:12:34 +01:00
|
|
|
|
## What it does
|
|
|
|
|
|
|
|
|
|
|
|
- One persistent server per session (a Unix socket in
|
2026-11-22 04:04:58 +01:00
|
|
|
|
`$XDG_RUNTIME_DIR/murx-<uid>/`, `$TMPDIR/murx-<uid>/`, or `/tmp/murx-<uid>/`,
|
|
|
|
|
|
with a `/tmp` fallback for long paths).
|
2026-10-29 18:12:34 +01:00
|
|
|
|
- Windows, panes, splits, resizing, renaming and a status line.
|
|
|
|
|
|
- Real ptys per pane, a built-in VT100/xterm-ish screen emulator (colors,
|
|
|
|
|
|
256-color and truecolor SGR, alternate screen, scrolling, UTF-8, wide
|
|
|
|
|
|
characters).
|
2026-11-15 01:32:30 +01:00
|
|
|
|
- Application cursor-key mode follows the active pane, so arrow navigation
|
|
|
|
|
|
works in programs such as Midnight Commander. Menus and prompts use normal
|
|
|
|
|
|
cursor-key mode; detaching restores normal cursor keys in the outer terminal.
|
2026-11-21 11:49:28 +01:00
|
|
|
|
- Home (Pos1) and End use the pane’s `screen-256color` key sequences.
|
2026-11-08 20:34:17 +01:00
|
|
|
|
- Multiple clients can attach to the same session. The most recently attached
|
|
|
|
|
|
or resized client sets the session size; a larger client shows the session
|
|
|
|
|
|
centred in its terminal, while a smaller client shows the top-left part.
|
|
|
|
|
|
`Ctrl-A R` forces the session back to the current client's terminal size.
|
2026-11-22 05:30:22 +01:00
|
|
|
|
- Panes run `$SHELL` as a login shell with `TERM=screen-256color` and
|
|
|
|
|
|
`MURX=<session>`. They inherit the launching process's umask, so builds keep
|
|
|
|
|
|
their usual file permissions. After upgrading from a version that forced `077`,
|
|
|
|
|
|
restart the session server to apply the fix. In an existing shell, `umask 022`
|
|
|
|
|
|
restores typical public file permissions for subsequent commands, including
|
|
|
|
|
|
builds published with `rsync -a`. murx refuses to start inside another murx
|
|
|
|
|
|
session; use `env -u MURX murx` to override intentionally.
|
2026-11-19 09:42:53 +01:00
|
|
|
|
- Window names show `program` for the foreground program in their active pane,
|
|
|
|
|
|
refreshed every second, including in inactive windows. With `--hostname`,
|
|
|
|
|
|
they show `hostname:program` (for example `laptop:zsh` or `laptop:vim`). When a program exits, the name returns to the shell. For
|
2026-11-16 00:42:15 +01:00
|
|
|
|
pipelines, the foreground process group leader supplies the name. Linux uses
|
|
|
|
|
|
`/proc`; other systems use `ps`.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
2026-11-16 23:12:52 +01:00
|
|
|
|
## SSH window names and directories (optional)
|
2026-11-15 01:27:55 +01:00
|
|
|
|
|
2026-11-19 09:42:53 +01:00
|
|
|
|
Enable `--hostname` to display reported remote hostnames and `--cwd` to
|
|
|
|
|
|
display reported remote directories when creating the session. The hostname
|
|
|
|
|
|
examples below assume `--hostname` is enabled.
|
|
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
This section is **optional** and only needed if you want `murx` to show
|
2026-11-16 23:12:52 +01:00
|
|
|
|
details from inside an SSH session (remote hostname/program in window titles
|
|
|
|
|
|
and the window list, remote working directory in the status line, and reported
|
2026-11-17 03:06:45 +01:00
|
|
|
|
remote root status). If you do not use SSH from `murx`, or you are fine with
|
2026-11-16 23:12:52 +01:00
|
|
|
|
the pane being shown as the local `ssh` process (e.g. `local-hostname:ssh`),
|
|
|
|
|
|
you can skip this entire section—no remote configuration is required for
|
|
|
|
|
|
normal local use.
|
2026-11-16 00:47:53 +01:00
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
While an SSH pane is active, `murx` can show `[murx] remote-hostname:program`
|
|
|
|
|
|
(for example `[murx] server:vim`) in the outer terminal title and
|
2026-11-16 23:12:52 +01:00
|
|
|
|
`server:vim` in the window list, update it as remote programs start/stop, and
|
|
|
|
|
|
show the remote shell name (for example `server:zsh`) at a remote prompt.
|
|
|
|
|
|
Because SSH does not expose the remote foreground program, directory, or root
|
|
|
|
|
|
status to the local terminal, the **remote shell** must emit OSC title/reports
|
2026-11-17 03:06:45 +01:00
|
|
|
|
for `murx` to display this. Without those reports, names remain
|
2026-11-16 23:12:52 +01:00
|
|
|
|
`local-hostname:ssh` and remote directory/root details are not tracked.
|
|
|
|
|
|
Names refresh within one second; disconnecting restores the local hostname,
|
|
|
|
|
|
shell name, and path.
|
|
|
|
|
|
|
|
|
|
|
|
To enable remote root detection after `su` or `sudo -i`, install the matching
|
|
|
|
|
|
hook in **both the regular user's and root's shell startup files on the remote
|
|
|
|
|
|
host you connect to over SSH**. The hooks also activate in interactive
|
|
|
|
|
|
`screen-256color` terminals, so they continue working when privilege-switching
|
|
|
|
|
|
tools remove `$SSH_CONNECTION`. Root prompts and commands then turn the active
|
|
|
|
|
|
window name red; exiting back to the regular shell restores yellow. A reported
|
|
|
|
|
|
remote `su` command is red while it runs, even before the new shell reports its
|
|
|
|
|
|
UID. SSH disconnects restore local detection. No SSH server configuration
|
|
|
|
|
|
change is required.
|
2026-11-16 05:18:43 +01:00
|
|
|
|
|
2026-11-16 00:47:53 +01:00
|
|
|
|
### Zsh
|
2026-11-15 01:27:55 +01:00
|
|
|
|
|
2026-11-16 23:12:52 +01:00
|
|
|
|
If you want this optional integration, add this to `~/.zshrc` on the remote
|
|
|
|
|
|
host you connect to over SSH:
|
2026-11-15 01:27:55 +01:00
|
|
|
|
|
|
|
|
|
|
```zsh
|
2026-11-16 05:18:43 +01:00
|
|
|
|
if [[ -o interactive && ( -n $SSH_CONNECTION || $TERM == screen-256color ) ]]; then
|
2026-11-15 01:27:55 +01:00
|
|
|
|
autoload -Uz add-zsh-hook
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_title() {
|
2026-11-15 01:27:55 +01:00
|
|
|
|
local program=${1:t}
|
|
|
|
|
|
printf '\033]2;%s:%s\007' "${HOST%%.*}" "$program"
|
2026-11-16 00:15:00 +01:00
|
|
|
|
local directory=$PWD
|
|
|
|
|
|
if [[ $directory == "$HOME" ]]; then
|
|
|
|
|
|
directory='~'
|
|
|
|
|
|
elif [[ $directory == "$HOME/"* ]]; then
|
|
|
|
|
|
directory="~/${directory#"$HOME/"}"
|
|
|
|
|
|
fi
|
2026-11-17 03:06:45 +01:00
|
|
|
|
printf '\033]777;murx-cwd;%s\007' "$directory"
|
|
|
|
|
|
printf '\033]777;murx-root;%s\007' "$((EUID == 0))"
|
2026-11-15 01:27:55 +01:00
|
|
|
|
}
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_preexec() {
|
2026-11-15 01:27:55 +01:00
|
|
|
|
local -a words
|
|
|
|
|
|
words=(${(z)1})
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_title "${(Q)words[1]}"
|
2026-11-15 01:27:55 +01:00
|
|
|
|
}
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_precmd() { murx_ssh_title zsh; }
|
|
|
|
|
|
add-zsh-hook preexec murx_ssh_preexec
|
|
|
|
|
|
add-zsh-hook precmd murx_ssh_precmd
|
2026-11-15 01:27:55 +01:00
|
|
|
|
fi
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
This reports the command launched by the shell (the first command for a
|
2026-11-17 03:06:45 +01:00
|
|
|
|
pipeline), then `hostname:zsh` at the prompt. murx retains the latest
|
2026-11-15 01:27:55 +01:00
|
|
|
|
`hostname:program` for that SSH job when programs send other terminal titles,
|
|
|
|
|
|
so these cannot reset the window name to `local-hostname:ssh`.
|
2026-11-16 00:15:00 +01:00
|
|
|
|
The hook also reports the remote working directory before each command and at
|
|
|
|
|
|
each prompt, so the status bar follows remote `cd` commands and shows `~` for
|
|
|
|
|
|
the remote home directory. Disconnecting restores the local path. Restart
|
2026-11-17 03:06:45 +01:00
|
|
|
|
existing murx servers and reload the remote shell configuration after upgrading.
|
2026-11-16 00:15:00 +01:00
|
|
|
|
|
2026-11-16 00:47:53 +01:00
|
|
|
|
### Bash
|
|
|
|
|
|
|
2026-11-16 23:12:52 +01:00
|
|
|
|
If you want this optional integration, add this to `~/.bashrc` on the remote
|
|
|
|
|
|
host you connect to over SSH:
|
2026-11-16 00:47:53 +01:00
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-11-16 05:18:43 +01:00
|
|
|
|
if [[ $- == *i* && ( -n $SSH_CONNECTION || $TERM == screen-256color ) &&
|
2026-11-17 03:06:45 +01:00
|
|
|
|
-z ${murx_ssh_installed-} ]]; then
|
|
|
|
|
|
murx_ssh_title() {
|
2026-11-16 00:47:53 +01:00
|
|
|
|
local program=$1 directory=$PWD
|
|
|
|
|
|
program=${program##*/}
|
|
|
|
|
|
printf '\033]2;%s:%s\007' "${HOSTNAME%%.*}" "$program"
|
|
|
|
|
|
if [[ $directory == "$HOME" ]]; then
|
|
|
|
|
|
directory='~'
|
|
|
|
|
|
elif [[ $directory == "$HOME/"* ]]; then
|
|
|
|
|
|
directory="~/${directory#"$HOME/"}"
|
|
|
|
|
|
fi
|
2026-11-17 03:06:45 +01:00
|
|
|
|
printf '\033]777;murx-cwd;%s\007' "$directory"
|
|
|
|
|
|
printf '\033]777;murx-root;%s\007' "$((EUID == 0))"
|
2026-11-16 00:47:53 +01:00
|
|
|
|
}
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_preexec() {
|
|
|
|
|
|
if [[ ${murx_ssh_ready-0} == 1 && $1 != murx_ssh_precmd ]]; then
|
|
|
|
|
|
murx_ssh_ready=0
|
2026-11-16 00:47:53 +01:00
|
|
|
|
local program rest
|
|
|
|
|
|
read -r program rest <<< "$1"
|
|
|
|
|
|
# Strip quotes around a simple command name without evaluating it.
|
|
|
|
|
|
program=${program#\"}; program=${program%\"}
|
|
|
|
|
|
program=${program#\'}; program=${program%\'}
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_title "$program"
|
2026-11-16 00:47:53 +01:00
|
|
|
|
fi
|
|
|
|
|
|
return 0
|
|
|
|
|
|
}
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_precmd() {
|
2026-11-16 00:47:53 +01:00
|
|
|
|
local last_status=$?
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx_ssh_title bash
|
|
|
|
|
|
murx_ssh_ready=1
|
2026-11-16 00:47:53 +01:00
|
|
|
|
return "$last_status"
|
|
|
|
|
|
}
|
|
|
|
|
|
# Keep existing prompt commands, and run our prompt hook last.
|
|
|
|
|
|
if [[ $(declare -p PROMPT_COMMAND 2>/dev/null) == 'declare -a '* ]]; then
|
2026-11-17 03:06:45 +01:00
|
|
|
|
PROMPT_COMMAND+=(murx_ssh_precmd)
|
2026-11-16 00:47:53 +01:00
|
|
|
|
else
|
2026-11-17 03:06:45 +01:00
|
|
|
|
PROMPT_COMMAND=("${PROMPT_COMMAND-}" murx_ssh_precmd)
|
2026-11-16 00:47:53 +01:00
|
|
|
|
fi
|
2026-11-17 03:06:45 +01:00
|
|
|
|
trap 'murx_ssh_preexec "$BASH_COMMAND"' DEBUG
|
|
|
|
|
|
murx_ssh_installed=1
|
2026-11-16 00:47:53 +01:00
|
|
|
|
fi
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
This updates `hostname:program` before a command, restores `hostname:bash`
|
|
|
|
|
|
at the prompt, and reports the remote directory with `$HOME` shortened to
|
|
|
|
|
|
`~`. The hooks print only invisible terminal updates. Source `~/.bashrc` or
|
|
|
|
|
|
open a new SSH shell after installing them.
|
|
|
|
|
|
|
|
|
|
|
|
The Bash snippet preserves string and array forms of `PROMPT_COMMAND` and
|
|
|
|
|
|
avoids duplicate hooks when sourced again. It installs a `DEBUG` trap; if your
|
|
|
|
|
|
shell configuration already uses one (for example through bash-preexec),
|
|
|
|
|
|
integrate these functions with that framework instead of replacing its trap.
|
|
|
|
|
|
Command names come from the first whitespace-delimited word of Bash's first
|
|
|
|
|
|
simple command; aliases, compound commands, assignments and quoted executable
|
|
|
|
|
|
paths containing spaces may display differently from the Zsh hook. The command
|
|
|
|
|
|
text is never evaluated by the hook. Do not enable function tracing (`set -T`)
|
|
|
|
|
|
for these hooks.
|
|
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
murx accepts standard OSC 7 reports (`ESC ] 7 ; file://host/path BEL`) too,
|
2026-11-16 00:15:00 +01:00
|
|
|
|
including percent-encoded paths. These display the reported absolute path;
|
2026-11-17 03:06:45 +01:00
|
|
|
|
`OSC 777;murx-cwd;path` accepts either an absolute path or a path starting with
|
2026-11-16 00:15:00 +01:00
|
|
|
|
`~` and preserves that abbreviation. Reports belong to the foreground job
|
|
|
|
|
|
that sent them, so an old SSH connection cannot override the local shell's path.
|
2026-11-17 03:06:45 +01:00
|
|
|
|
The hooks also send `OSC 777;murx-root;1` for effective UID 0 and
|
|
|
|
|
|
`OSC 777;murx-root;0` otherwise, allowing the active remote window name to turn
|
2026-11-16 05:00:19 +01:00
|
|
|
|
red in a root shell. This is a visual hint based on shell reports, not a
|
|
|
|
|
|
security indicator.
|
2026-11-16 00:15:00 +01:00
|
|
|
|
|
2026-11-15 01:27:55 +01:00
|
|
|
|
Other shells can use equivalent
|
|
|
|
|
|
hooks sending `printf '\033]2;server:vim\007'`; use a hostname containing only
|
|
|
|
|
|
letters, digits, dots, underscores or hyphens, and a program basename without
|
|
|
|
|
|
spaces or colons. With splits, the window follows its active pane.
|
|
|
|
|
|
|
2026-10-29 18:12:34 +01:00
|
|
|
|
## Keys
|
|
|
|
|
|
|
2026-11-22 04:04:58 +01:00
|
|
|
|
The default prefix is `Ctrl-A`. Every shortcut below shows the default prefix;
|
|
|
|
|
|
if you chose a different prefix with `-p`, `--prefix`, or the Configuration
|
|
|
|
|
|
menu, press that prefix instead. Doubling the prefix switches to the last
|
|
|
|
|
|
window.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
|
|
|
|
|
| Chain | Action |
|
|
|
|
|
|
| --- | --- |
|
2026-11-22 04:04:58 +01:00
|
|
|
|
| `Ctrl-A m` | open the main menu |
|
|
|
|
|
|
| `Ctrl-A a` | send the prefix literally to the pane |
|
2026-10-29 18:12:34 +01:00
|
|
|
|
| `Ctrl-A c`, `Ctrl-A Ctrl-C` | new window |
|
|
|
|
|
|
| `Ctrl-A n`, `Ctrl-A Space`, `Ctrl-A Ctrl-N`, `Ctrl-A Ctrl-@` | next window |
|
|
|
|
|
|
| `Ctrl-A p`, `Ctrl-A Ctrl-P`, `Ctrl-A Backspace` | previous window |
|
|
|
|
|
|
| `Ctrl-A Ctrl-A` | last window |
|
|
|
|
|
|
| `Ctrl-A w`, `Ctrl-A Ctrl-W`, `Ctrl-A "` | window menu (↑/↓, `j`/`k`, Enter) |
|
2026-11-15 00:41:24 +01:00
|
|
|
|
| `Ctrl-A A` | temporarily rename window (until the next automatic name refresh) |
|
2026-10-29 18:12:34 +01:00
|
|
|
|
| `Ctrl-A 0` … `Ctrl-A 9` | select window by its number in the status line |
|
|
|
|
|
|
| `Ctrl-A -` | split top/bottom |
|
|
|
|
|
|
| `Ctrl-A \|`, `Ctrl-A %` | split left/right |
|
|
|
|
|
|
| `Ctrl-A h` `Ctrl-A j` `Ctrl-A k` `Ctrl-A l`, `Ctrl-A` ↑/↓/←/→ | select pane |
|
|
|
|
|
|
| `Ctrl-A Tab` / `Ctrl-A Shift-Tab` | next / previous pane |
|
|
|
|
|
|
| `Ctrl-A o` | next pane |
|
|
|
|
|
|
| `Ctrl-A Ctrl-H` `Ctrl-A Ctrl-J` `Ctrl-A Ctrl-K` `Ctrl-A Ctrl-L` | resize pane (8/5/5/8) |
|
|
|
|
|
|
| `Ctrl-A x`, `Ctrl-A Ctrl-X` | lock the client |
|
2026-11-15 06:43:22 +01:00
|
|
|
|
| `Ctrl-A Page Up`, `Ctrl-A [` | enter scrollback (Page Up also scrolls one page) |
|
2026-10-29 18:12:34 +01:00
|
|
|
|
| `Ctrl-A K` | kill pane (confirm) |
|
|
|
|
|
|
| `Ctrl-A &` | kill window (confirm) |
|
|
|
|
|
|
| `Ctrl-A \` | kill server (confirm) |
|
|
|
|
|
|
| `Ctrl-A r` | show `Configuration Reloaded!` |
|
2026-11-08 20:34:17 +01:00
|
|
|
|
| `Ctrl-A R` | force the session to this client's terminal size |
|
2026-10-29 18:12:34 +01:00
|
|
|
|
| `Ctrl-A *` | list attached clients |
|
|
|
|
|
|
| `Ctrl-A d`, `Ctrl-A Ctrl-D` | detach |
|
|
|
|
|
|
|
|
|
|
|
|
Two bindings worth noting: `Ctrl-A Ctrl-H`/`Ctrl-A Ctrl-L` resize the pane
|
|
|
|
|
|
(they do not switch windows), and `Ctrl-A k` selects the pane above while
|
|
|
|
|
|
`Ctrl-A K` kills it.
|
|
|
|
|
|
|
2026-11-22 04:04:58 +01:00
|
|
|
|
## Menu
|
|
|
|
|
|
|
|
|
|
|
|
`Ctrl-A m` opens the main menu: a boxed overlay in murx blues, cyan and
|
|
|
|
|
|
yellow on black. Move with ↑/↓ (or `j`/`k`), press Enter to select, use
|
|
|
|
|
|
←/→ (or `h`/`l`) to enter or leave submenus, and press Escape, `q`, or
|
|
|
|
|
|
Ctrl-C to close. Long menus scroll when the terminal is short.
|
|
|
|
|
|
|
|
|
|
|
|
The main menu offers new window (tab), new pane (horizontal and vertical
|
|
|
|
|
|
splits), close pane/window, rename, the window list, pane selection and
|
|
|
|
|
|
resizing, and a `Session...` submenu with detach, lock, client list,
|
|
|
|
|
|
scrollback, forced resize and kill server. `Configuration...` contains:
|
|
|
|
|
|
|
|
|
|
|
|
- `Status line...` — position (top/bottom) and background (default, black
|
|
|
|
|
|
`000000`, grey `191a1c`).
|
|
|
|
|
|
- `Prefix...` — this client's Ctrl-key prefix, `a` through `z`.
|
2026-11-23 11:39:43 +01:00
|
|
|
|
- Toggles for the current directory, clock, `[murx]` label, hostname and pane
|
|
|
|
|
|
titles.
|
2026-11-22 04:04:58 +01:00
|
|
|
|
- `Reset display/status defaults`.
|
|
|
|
|
|
|
2026-11-23 11:55:50 +01:00
|
|
|
|
Press Enter on a toggle to turn it on or off. Settings changes apply
|
|
|
|
|
|
immediately. Session settings affect all attached
|
2026-11-22 04:04:58 +01:00
|
|
|
|
clients; the prefix is per-client. Nothing is written to disk, so changes
|
|
|
|
|
|
last until the session ends or you change them again. The command-line
|
|
|
|
|
|
options still decide the initial values when a session starts.
|
|
|
|
|
|
|
|
|
|
|
|
`Ctrl-A w` still opens the window list directly, now in the same menu style;
|
|
|
|
|
|
Left returns from it to the main menu. The menu items live in one table near
|
|
|
|
|
|
the top of `murx.c`, so adding entries does not mean changing the drawing or
|
|
|
|
|
|
key-handling code.
|
|
|
|
|
|
|
2026-11-15 06:43:22 +01:00
|
|
|
|
## Scrollback
|
|
|
|
|
|
|
|
|
|
|
|
Press `Ctrl-A`, then `Page Up` to scroll back in the active pane. Use
|
|
|
|
|
|
`Page Up` and `Page Down` without the prefix to move through history.
|
|
|
|
|
|
`Ctrl-A [` opens scrollback at the current screen. Press `q`, Escape,
|
2026-11-21 06:04:53 +01:00
|
|
|
|
Enter or Ctrl-C to return to live output. While browsing, use the usual
|
|
|
|
|
|
window shortcuts to switch directly, including `Ctrl-A n`, `Ctrl-A p`,
|
|
|
|
|
|
`Ctrl-A 0` through `Ctrl-A 9`, a double prefix, or `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.
|
2026-11-15 06:43:22 +01:00
|
|
|
|
|
2026-11-23 11:39:43 +01:00
|
|
|
|
Each pane keeps up to 2,000 lines of normal screen history by default.
|
|
|
|
|
|
Use `murx --history 10000 work` when creating a session to keep up to 10,000
|
|
|
|
|
|
lines per pane. The limit accepts 0 to 100,000 lines, with 0 disabling history
|
|
|
|
|
|
retention. Reattaching to a session preserves its history limit.
|
|
|
|
|
|
The view is frozen while browsing; programs keep running and new output
|
|
|
|
|
|
continues to be saved when history retention is enabled.
|
2026-11-21 06:04:53 +01:00
|
|
|
|
Scrollback views are private to each client and saved per pane while attached.
|
|
|
|
|
|
Alternate-screen programs such as editors do not add history; opening
|
2026-11-15 06:43:22 +01:00
|
|
|
|
scrollback there shows only their current screen. History is kept in memory,
|
|
|
|
|
|
retains colors, and is clipped or padded to the pane width without reflow.
|
|
|
|
|
|
Restart an existing session server after upgrading to enable this feature.
|
|
|
|
|
|
|
2026-10-29 18:12:34 +01:00
|
|
|
|
## Colors
|
|
|
|
|
|
|
|
|
|
|
|
Hard-coded:
|
|
|
|
|
|
|
2026-11-21 06:04:53 +01:00
|
|
|
|
- Status on top by default (`-s bottom` moves it), default background (overridable with `-c`),
|
|
|
|
|
|
foreground `colour12`. The palette mirrors
|
2026-10-29 18:12:34 +01:00
|
|
|
|
`~/.tmux.conf`.
|
2026-11-19 09:42:53 +01:00
|
|
|
|
- With `--cwd`, `[/path/to/directory]` on the left (directory in `colour14`, brackets
|
2026-11-15 23:53:58 +01:00
|
|
|
|
`colour12`), refreshed every second and when switching panes. On Linux this
|
|
|
|
|
|
follows the active pane's foreground process, falling back to its shell's
|
|
|
|
|
|
directory; on other systems it shows the session's starting directory.
|
2026-11-17 03:06:45 +01:00
|
|
|
|
Paths in `$HOME` use `~`, for example `[~/code/murx]`; `$HOME` itself
|
2026-11-15 23:53:58 +01:00
|
|
|
|
appears as `[~]`. Long paths end in `...` to leave room for the window list and clock; the
|
|
|
|
|
|
directory label is hidden when fewer than four columns remain. Remote SSH
|
2026-11-16 00:15:00 +01:00
|
|
|
|
directories require a shell report; see [SSH window names and directories](#ssh-window-names-and-directories).
|
2026-11-19 09:42:53 +01:00
|
|
|
|
- With `--murx` and without `--cwd`, `[murx]` on the left.
|
|
|
|
|
|
- With `--clock`, `HH:MM:SS` on the right in `colour12`, refreshed every second.
|
2026-11-16 05:00:19 +01:00
|
|
|
|
- Window list right-aligned: current name `colour11`, or red `colour9` when
|
|
|
|
|
|
its active pane's foreground process is `su` or has effective UID 0. Other
|
|
|
|
|
|
window names use `colour12`; separators/flags use `colour14`. The color
|
|
|
|
|
|
refreshes within one second and returns to yellow after leaving the root
|
|
|
|
|
|
shell or switching to an unprivileged pane. Over SSH, the remote hooks above
|
|
|
|
|
|
report root status; install them in each remote shell, including root's.
|
|
|
|
|
|
A root shell that does not run the hooks cannot report its privilege change.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
- Pane borders are thin box-drawing lines (`─`, `│`, `┬`, `┼`, ...) in
|
2026-11-23 11:39:43 +01:00
|
|
|
|
`colour8`, drawn on the terminal's default background. Enable title rows
|
|
|
|
|
|
with `--pane-titles` or the Configuration menu. Each title row shows
|
|
|
|
|
|
`[N: title]`. On the active pane, brackets and numbers use `colour7`, the
|
|
|
|
|
|
separator uses `colour11`, and the title uses `colour15`. Inactive panes
|
|
|
|
|
|
use `colour8`, `colour3`, and `colour12`.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
- Messages use `fg=colour6,bg=colour8`.
|
2026-11-22 04:04:58 +01:00
|
|
|
|
- Menus use a black background with a `colour12` frame, `colour11` titles and
|
|
|
|
|
|
selection, `colour14` accents and dim `colour8` hints and separators.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
2026-11-20 03:38:58 +01:00
|
|
|
|
Use `-c RRGGBB` or `--color RRGGBB` to set the session's status bar
|
|
|
|
|
|
background for all attached clients. Supply six hexadecimal digits, such as
|
|
|
|
|
|
`000000` for black. The session remembers the color across reattachments. New
|
|
|
|
|
|
sessions use the terminal's default background unless a color is supplied.
|
2026-11-20 03:01:53 +01:00
|
|
|
|
|
2026-11-22 04:04:58 +01:00
|
|
|
|
Colours are written to the outer terminal using 256-colour SGR (`38;5;n` /
|
|
|
|
|
|
`48;5;n`) by default. RGB pane colours are passed through as 24-bit SGR when
|
|
|
|
|
|
the outer terminal advertises `COLORTERM=truecolor` or `COLORTERM=24bit` and
|
|
|
|
|
|
`TERM` does not start with `screen`, `tmux`, `linux`, or `dumb`; otherwise RGB
|
|
|
|
|
|
is mapped to the nearest xterm-256 entry.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
2026-11-19 09:42:53 +01:00
|
|
|
|
The terminal window title is set to `[murx] program`, following the active
|
|
|
|
|
|
murx window, or `[murx] hostname:program` with `--hostname`. Hostnames use
|
|
|
|
|
|
their short form (before the first dot). The `[murx]` prefix in the outer
|
|
|
|
|
|
terminal title is always present; `--murx` controls only the status bar label.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
|
|
|
|
|
## Deliberate limitations
|
|
|
|
|
|
|
|
|
|
|
|
This is "very basic" by design:
|
|
|
|
|
|
|
|
|
|
|
|
- No config file, no command prompt, no scripting, no plugins.
|
2026-11-15 06:43:22 +01:00
|
|
|
|
- No text selection or copying in scrollback, no zoom, no activity monitoring,
|
|
|
|
|
|
no clock mode.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
- The lock screen is a cosmetic client lock: press Enter to unlock. It is not a
|
|
|
|
|
|
password lock.
|
|
|
|
|
|
- Mouse reporting is not negotiated with the outer terminal.
|
|
|
|
|
|
- Killing the server affects only the current session, since each named
|
|
|
|
|
|
session has its own small server process.
|
2026-11-22 04:04:58 +01:00
|
|
|
|
- At most 60 panes may be created in a window.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
- Key repeat is not implemented: one resize step per key press.
|
2026-11-17 03:06:45 +01:00
|
|
|
|
- New windows start in the directory murx was started from, not in the
|
2026-10-29 18:12:34 +01:00
|
|
|
|
current pane's directory.
|
|
|
|
|
|
- Resizing does not reflow existing text.
|
2026-11-16 06:42:14 +01:00
|
|
|
|
- Session dimensions are clamped to 1,000 columns and 1,000 rows. Numeric
|
|
|
|
|
|
escape parameters saturate at the C integer limit; cursor movement and line
|
|
|
|
|
|
operations are bounded by the screen and retained history. Invalid UTF-8
|
|
|
|
|
|
is replaced with the replacement character. Allocation arithmetic that
|
|
|
|
|
|
exceeds representable sizes terminates with a numeric-limit error.
|
2026-10-29 18:12:34 +01:00
|
|
|
|
|
|
|
|
|
|
## Build notes
|
|
|
|
|
|
|
2026-11-19 12:49:57 +01:00
|
|
|
|
Requires a C99 compiler and POSIX. Build with `make`. Runs on Linux, macOS,
|
|
|
|
|
|
FreeBSD and OpenBSD (using `openpty(3)` for panes; the Makefile links `-lutil`
|
|
|
|
|
|
automatically on the BSDs where it is needed). Tested with Clang and
|
2026-11-17 11:08:16 +01:00
|
|
|
|
GCC 16; `grid_resize()` carries a guarded workaround for a GCC 16 optimizer bug
|
|
|
|
|
|
that otherwise collapses pane grids to 1x1.
|
2026-11-16 01:01:57 +01:00
|
|
|
|
|
2026-11-16 01:34:50 +01:00
|
|
|
|
## Linux packages
|
|
|
|
|
|
|
2026-11-23 12:26:37 +01:00
|
|
|
|
The [Alpine recipe](alpine/APKBUILD) and [Arch recipe](arch/PKGBUILD)
|
|
|
|
|
|
build from the local checkout using symlinks to the source files. The package
|
|
|
|
|
|
version comes from `MURX_VERSION` in `murx.c`. Adjust the package release fields
|
|
|
|
|
|
separately as needed. Both recipes
|
2026-11-23 08:46:51 +01:00
|
|
|
|
build with the default C compiler and pass distro `CFLAGS` to `make`. The
|
|
|
|
|
|
packages install under `/usr`, including the manual, README, AUTHORS and
|
|
|
|
|
|
license.
|
2026-11-16 01:34:50 +01:00
|
|
|
|
|
|
|
|
|
|
On Alpine, install `alpine-sdk`, configure your abuild signing key with
|
|
|
|
|
|
`abuild-keygen -a -i`, and run as a regular user with abuild configured:
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
2026-11-23 12:26:37 +01:00
|
|
|
|
make pkgalpine
|
2026-11-16 01:34:50 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
Install the resulting `murx` package and its `murx-doc` subpackage for the
|
2026-11-16 01:34:50 +01:00
|
|
|
|
manual. abuild writes packages beneath its configured repository destination
|
|
|
|
|
|
(normally `~/packages`); use `apk add /path/to/package.apk` for each signed
|
|
|
|
|
|
package after trusting your local signing key.
|
|
|
|
|
|
|
|
|
|
|
|
On Arch, install `base-devel` and run as a regular user:
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
2026-11-23 12:26:37 +01:00
|
|
|
|
make pkgsources
|
|
|
|
|
|
cd arch
|
2026-11-16 01:34:50 +01:00
|
|
|
|
makepkg -si
|
|
|
|
|
|
```
|
|
|
|
|
|
|
2026-11-23 12:26:37 +01:00
|
|
|
|
This builds the package and installs it through pacman. To build from the
|
|
|
|
|
|
repository root, run `make pkgarch`. The recipe lists
|
2026-11-16 01:34:50 +01:00
|
|
|
|
`x86_64` and `aarch64`; builds run on the current architecture.
|
|
|
|
|
|
|
2026-11-23 12:15:47 +01:00
|
|
|
|
For Gentoo, copy the [`app-misc/murx` package directory](gentoo/app-misc/murx)
|
|
|
|
|
|
into a configured local Portage overlay. The ebuild fetches the tagged release
|
|
|
|
|
|
archive and includes a Manifest with its checksums. It is keyworded `~amd64`;
|
|
|
|
|
|
accept that keyword for `app-misc/murx` if your system uses stable keywords.
|
|
|
|
|
|
Then install it with:
|
|
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
|
emerge --ask app-misc/murx
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
For a new Gentoo release, copy the ebuild to the new versioned filename and
|
|
|
|
|
|
run `ebuild murx-VERSION.ebuild manifest` after publishing the matching tag.
|
|
|
|
|
|
|
2026-11-21 12:16:50 +01:00
|
|
|
|
After changing a packaged source file, run `make pkgsums` to sync both package
|
|
|
|
|
|
versions and refresh both sets of checksums. This target requires `abuild`
|
|
|
|
|
|
and `updpkgsums` (from `pacman-contrib`). Neither recipe
|
2026-11-17 03:06:45 +01:00
|
|
|
|
requires a test suite; its check step runs `murx --help` as a smoke check.
|
2026-11-16 01:34:50 +01:00
|
|
|
|
|
2026-11-16 01:01:57 +01:00
|
|
|
|
## Authors
|
|
|
|
|
|
|
2026-11-17 05:35:58 +01:00
|
|
|
|
See [AUTHORS](AUTHORS) for project credits.
|
|
|
|
|
|
|
2026-11-16 01:02:35 +01:00
|
|
|
|
- Armin Jenewein - <a@bsd.pm> - Founder
|
|
|
|
|
|
- Johannes Findeisen - <you@hanez.org> - Contributor
|
2026-11-16 01:01:57 +01:00
|
|
|
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
|
|
|
|
Copyright 2026 Armin Jenewein
|
|
|
|
|
|
|
2026-11-17 03:06:45 +01:00
|
|
|
|
The code of murx is licensed under the terms of the Apache-2.0 license. See
|
2026-11-16 01:01:57 +01:00
|
|
|
|
LICENSE for details.
|