mtrm is a personal terminal workspace manager for local Linux shell work.
It gives me tabs, pane splits, keyboard-driven focus movement, desktop clipboard integration, and automatic persistence of layout and working directories.
It is intentionally opinionated and optimized for my own desktop workflow rather than traditional terminal or tmux conventions.
In particular, Ctrl+C is used for copy, Ctrl+V for paste, and Alt+X for interrupt.
If you want a local shell workspace with saved layout, familiar copy/paste, and no separate multiplexer layer to manage, that is the problem mtrm is trying to solve.
This repository contains the application and the design notes behind it.
- Runs local shells in PTYs
- Supports multiple tabs
- Splits the active tab into multiple panes
- Moves focus between panes with the keyboard
- Copies and pastes through the desktop clipboard
- Saves and restores layout, active tab, active pane, and pane working directories
By default, mtrm starts $SHELL -i. If $SHELL is not set, it falls back to /bin/sh -i.
mtrm does not restore old live processes after restart. It recreates fresh shells in the saved working directories.
mtrm is currently a Linux-first tool for local desktop use.
More specifically, the implementation in this repository has been tested on:
- Linux Mint 22.3
Current expectations:
- It is meant to run locally on a Linux desktop session
- It is not designed as a remote terminal or server session manager
- It can start even when the local system clipboard backend is unavailable
- Clipboard support depends on the local desktop environment; in headless or remote sessions built-in copy and paste may be unavailable
- State restore brings back layout and working directories, not old running processes
- Windows and macOS builds are not supported targets yet
GitHub Releases publish Linux artifacts you can download directly:
mtrm.debmtrmmtrm-x86_64-unknown-linux-musl
Use them like this:
mtrm.deb: Debian or Ubuntu-style installationmtrm: the regular GNU/Linux executablemtrm-x86_64-unknown-linux-musl: a statically linked Linux binary for systems where the regular executable fails with errors such asGLIBC_x.y not found
At the moment, the supported release targets are Linux only.
From the repository root:
cargo run -p mtrmThis starts mtrm with your current $SHELL in interactive mode.
To simulate a session without system clipboard integration:
cargo run -p mtrm -- --no-clipboardcargo install --path app --root ~/.localIf ~/.local/bin is in your PATH, you can then run:
mtrmmtrm also supports a few direct CLI flags:
mtrm --help
mtrm --version
mtrm --no-clipboard
mtrm --debug-log /tmp/mtrm-pty.log--help/-hprints help and exits--version/-vprints version and exits--no-clipboarddisables system clipboard integration even if it is available--debug-log PATHappends raw PTY output chunks toPATHfor terminal-debugging sessions
Ctrl+C: copy selected textCtrl+V: paste from the system clipboardAlt+X: sendSIGINTto the active processAlt+-: split the active pane left/rightAlt+=: split the active pane top/bottomAlt+Q: close the active pane if it is not the last oneAlt+T: open a new tabAlt+Shift+R: rename the current tabAlt+Shift+E: rename the current paneShift+F1: open the help overlayAlt+Shift+Left/Alt+Shift+Right/Alt+Shift+Up/Alt+Shift+Down: resize the active pane by one cellAlt+,: previous tabAlt+.: next tabAlt+W: close the current tab if it is not the last oneAlt+Shift+Q: save state and quitLeft/Right/Up/Down: send arrows to the active shellAlt+Left/Alt+Right/Alt+Up/Alt+Down: move focus between panesShift+Up/Shift+Down: scroll pane history by one lineShift+PageUp/Shift+PageDown: scroll pane history by one screenHome: send Home to the active shellEnd: return to the live bottom of the active pane
Letter-based shortcuts are configured through ~/.mtrm/keymap.toml.
If the system clipboard is unavailable, or if a clipboard read or write fails at runtime, Ctrl+C and Ctrl+V stay assigned to copy and paste, but mtrm shows a short notice inside the UI instead of exiting.
The same short-notice path is also used for other recoverable runtime failures such as state-save errors and user actions that cannot be completed.
The help overlay uses the same text as mtrm --help. It opens centered over the UI, closes with Esc, and supports scrolling with arrows and PageUp / PageDown on smaller terminals.
The bundled default keymap already covers:
- Latin layouts, including English, Spanish, and Portuguese
- Russian
- French AZERTY
- Greek
mtrm creates ~/.mtrm automatically.
Important files:
~/.mtrm/state.yaml
~/.mtrm/keymap.toml
If ~/.mtrm/state.yaml is missing, mtrm can still read a legacy ~/.mtrm/state.toml, but new saves are always written as YAML.
Scroll position is not persisted. After restart, panes reopen at the live bottom.
When the terminal window loses focus, the active tab and active pane border turn red.
User-facing documents:
Engineering documents:
