txm
is a command-line utility designed to manage terminal multiplexer sessions efficiently. It primarily works with tmux, with GNU Screen support as a fallback option. This makes it versatile across different environments and setups.
- Primary support for tmux with enhanced GNU Screen support
- Colored output support with automatic terminal capability detection
- Comprehensive session management (
create
,list
,attach
,delete
) - Window management for both tmux and GNU Screen
- Advanced tmux-specific features (
pane splitting
,resizing
,key sending
) - Cross-compatible window navigation between tmux and screen
Command | Description | tmux | GNU Screen |
---|---|---|---|
create |
Create a new session | ✓ | ✓ |
list |
List all active sessions | ✓ | ✓ |
attach |
Attach to an existing session | ✓ | ✓ |
detach |
Detach from current session | ✓ | ✓ |
delete |
Delete a session | ✓ | ✓ |
nuke |
Remove all sessions | ✓ | ✓ |
new-window |
Create a new window | ✓ | ✓ |
list-windows |
List windows in a session | ✓ | ✓ |
kill-window |
Remove a window | ✓ | ✓ |
next-window |
Switch to next window | ✓ | ✓ |
prev-window |
Switch to previous window | ✓ | ✓ |
rename-session |
Rename an existing session | ✓ | ✗ |
rename-window |
Rename a window | ✓ | ✓ |
move-window |
Move window between sessions | ✓ | ✗ |
swap-window |
Swap window positions | ✓ | ✗ |
split-window |
Split a window into panes | ✓ | ✓* |
list-panes |
List panes in a window | ✓ | ✗ |
kill-pane |
Remove a pane | ✓ | ✗ |
resize-pane |
Resize a pane | ✓ | ✗ |
send-keys |
Send keystrokes to a pane | ✓ | ✗ |
Note:
- Basic session and window management commands are supported in both backends
-
- GNU Screen only supports vertical splitting
- Some advanced window and all pane operations are exclusively available in tmux
Download pre-built binaries from the releases page:
txm-ubuntu.zip
: Ubuntu (Linux)txm-macOS.zip
: macOS
Installation steps:
- Download the appropriate ZIP file
- Extract it:
unzip txm-<platform>.zip
- Move to PATH:
sudo mv txm /usr/local/bin/
Quick install using the installation script:
For user-local installation (default)
curl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/install.sh | bash
For system-wide installation
curl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/install.sh | sudo bash -s -- --system
Requirements:
- Go 1.17 or later
- Either tmux or GNU Screen installed
Steps:
-
Clone the repository:
git clone https://github.com/MohamedElashri/txm
-
Navigate to project:
cd txm
-
Initialize module:
go mod init github.com/MohamedElashri/txm
-
Build:
go build -o txm
-
Install (optional):
sudo mv txm /usr/local/bin/
-
Create session:
txm create mysession
-
List sessions:
txm list
-
Attach to session:
txm attach mysession
-
Delete session:
txm delete mysession
-
Create window (tmux only):
txm new-window mysession windowname
-
Split window:
txm split-window mysession 0 v # vertical split txm split-window mysession 0 h # horizontal split
-
Move window:
txm move-window source-session 1 target-session
-
Resize pane:
txm resize-pane mysession 0 1 "-D 10" # resize down 10 units
For complete documentation, see docs.md. Or you can run txm help
to see the available commands. There is an old fashioned man
page available as well, run man txm
to see
NO_COLOR
: Disable colored outputTERM
: Used for terminal capability detection
To update txm to the latest version, you simply need to run the following command:
txm update
If you have installed it as system-wide, you need to run the following command:
sudo txm update
Remove txm and its configurations:
There is uninstall
option to uninstall txm that can be used to uninstall txm .
If something went wrong during the this process, you can uninstall txm using the following script:
For user-local uninstallation
curl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/uninstall.sh | bash
For system-wide uninstallation
curl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/uninstall.sh | sudo bash
Contributions welcome! Please submit issues and pull requests on GitHub.
GNU General Public License v3.0 - see LICENSE