txm
is a command-line utility designed to make working with tmux more efficient and user-friendly. It provides a set of commands to manage tmux sessions, windows, panes, and perform various actions. This project started as Go port (and extension) of the original txm written in Python. Another bash version can be found here. But now this is where txm is being developed and the other versions are archived.
- Create, list, attach to, detach from, rename, and kill tmux sessions
- Create, rename, close, and switch between windows
- Split panes vertically and horizontally
- Navigate between panes using arrow keys
- Resize panes
- Close panes
- Zoom in/out of panes
- Execute commands in panes
- Save and restore session layouts
- Set tmux options
- Execute scripts in specific panes
- Broadcast input to all panes
You can download pre-built binaries for your operating system from the releases page. Look for the latest release and download the appropriate ZIP file for your platform:
txm-ubuntu.zip
: Ubuntu (Linux)txm-macOS.zip
: macOS
Once downloaded, extract the ZIP file to obtain the txm
binary. You can then move the binary to a directory in your system's PATH
for easy access from the command line.
For example, on Unix-based systems (Linux and macOS), you can follow these steps:
-
Download the appropriate ZIP file for your platform.
-
Extract the ZIP file:
unzip txm-<platform>.zip
-
Move the
txm
binary to a directory in yourPATH
, such as/usr/local/bin
:sudo mv txm-<platform> /usr/local/bin/txm
Replace
<platform>
with the appropriate platform name (ubuntu-latest
, ormacOS-latest
).
You can use the install script to automate the installation process:
curl -s https://raw.githubusercontent.com/MohamedElashri/txm-go/main/utils/install.sh | bash
or if you want to install it for your non-root account user only.
curl -s https://raw.githubusercontent.com/MohamedElashri/txm-go/main/utils/install_no_root.sh | bash
This script will download the appropriate binary for your platform and install it in /usr/local/bin
.
If you prefer to build txm
from the source code, follow these steps:
-
Ensure you have Go installed on your system (version 1.17 or later).
-
Clone the
txm-go
repository:git clone https://github.com/MohamedElashri/txm-go
-
Navigate to the project directory:
cd txm-go
-
Initialize the Go module:
go mod init github.com/MohamedElashri/txm-go
-
Build the
txm
binary:go build -o txm
This will create a binary named
txm
in the current directory. -
(Optional) Move the
txm
binary to a directory in your system'sPATH
for easy access from the command line.For example, on Unix-based systems (Linux and macOS):
sudo mv txm /usr/local/bin/
After completing the installation steps, you can run txm
from the command line to start using the tmux manager.
txm
provides a wide range of commands to interact with tmux. Here are a few examples:
-
Create a new session:
txm new my-session
-
List all sessions:
txm list
-
Attach to a session:
txm attach my-session
-
Split pane vertically:
txm vsplit
-
Resize pane up by 5 units:
txm resize U 5
-
Execute a script in a specific pane:
txm execute-script 0.1 script.sh
For a complete list of available commands and their usage, refer to the man page:
man txm
Or you can consult the documentation
You can use the uninstall.sh
script to nuke the installation of txm including any config files and logs.
You can also directly execute the script from the shell (not recommended though)
curl -s https://raw.githubusercontent.com/MohamedElashri/txm-go/main/uninstall.sh | bash
txm
can be configured using a configuration file located at $HOME/.txm/config
. The configuration file allows you to set default options and customize the behavior of txm
.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.
This project is licensed under the GNU 3.0 License.