# txm - A Tmux Helper Tool
`txm` is a command-line utility to make working with [tmux](https://github.com/tmux/tmux/wiki) more efficient and user-friendly. It's written in Python and aims to abstract some of the complexities involved in managing tmux sessions, panes, and command executions.
## Table of Contents
- [txm - A Tmux Helper Tool](#txm---a-tmux-helper-tool)
- [Table of Contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
- [Session Management](#session-management)
- [Create a New Session](#create-a-new-session)
- [List All Sessions](#list-all-sessions)
- [Attach to a Session](#attach-to-a-session)
- [Detach from a Session](#detach-from-a-session)
- [Pane Management](#pane-management)
- [Split Pane Vertically](#split-pane-vertically)
- [Split Pane Horizontally](#split-pane-horizontally)
- [Navigate Between Panes](#navigate-between-panes)
- [Command Execution](#command-execution)
- [Execute a Command](#execute-a-command)
- [Configuration](#configuration)
- [.txm-config.json](#txm-configjson)
- [.txm-presets.json](#txm-presetsjson)
- [Contributing](#contributing)
- [License](#license)
## Installation
To install `txm`, navigate to the root directory of the project and execute the following command:
```bash
pip install .
```
This will build the package and install it. Also the package is temporarily available on pypitest (to move it later to pypi)
```
pip install -i https://test.pypi.org/simple/ txm
```
## Usage
Here are the available functionalities of `txm`.
### Session Management
#### Create a New Session
To create a new session, run:
```bash
txm new [SESSION_NAME]
```
#### List All Sessions
To list all available sessions, run:
```bash
txm list
```
#### Attach to a Session
To attach to an existing session, run:
```bash
txm attach [SESSION_NAME]
```
#### Detach from a Session
To detach from the current session, run:
```bash
txm detach
```
### Pane Management
#### Split Pane Vertically
To split the current pane vertically, run:
```bash
txm vsplit
```
#### Split Pane Horizontally
To split the current pane horizontally, run:
```bash
txm hsplit
```
#### Navigate Between Panes
To navigate between panes, run:
```bash
txm navigate [DIRECTION]
```
`DIRECTION` can be one of the following: `U` for up, `D` for down, `L` for left, `R` for right.
### Command Execution
#### Execute a Command
To execute a command in the current pane, run:
```bash
txm run [COMMAND]
```
## Configuration
`txm` can optionally read from a `.txm-config.json` file located in the root directory for user-specific settings.
### .txm-config.json
This configuration file contains settings and preferences for your TXM utility. It should be placed in the root directory of your project or your home directory.
**Default Template:**
```json
{
"tmux_path": "/usr/local/bin/tmux",
"log_directory": "logs/",
"default_session_name": "my_session"
}
```
- **tmux_path**: Specifies the path to the tmux executable.
- **log_directory**: Specifies the directory where tmux pane logs will be saved.
- **default_session_name**: Specifies the default name for a new tmux session.
### .txm-presets.json
This file holds the saved tmux session presets. It will be automatically generated by the `txm save` command, or you can create it manually in the directory of your choice.
**Default Template:**
```json
{
"presets": [
{
"name": "preset_1",
"windows": [
{
"name": "window_1",
"panes": ["command1", "command2"]
},
{
"name": "window_2",
"panes": ["command3", "command4"]
}
]
}
]
}
```
- **name**: Specifies the name of the saved preset.
- **windows**: Array of windows in the preset.
- **name**: Name of the window.
- **panes**: Array of commands to run in each pane.
## Contributing
Contributions are welcome. Feel free to open a pull request or submit an issue.
## License
This project is licensed under the MIT License. See the LICENSE.md file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/MohamedElashri/txm",
"name": "txm",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "tmux,cli,utility,terminal,multiplexer,terminal multiplexer,terminal multiplexing",
"author": "Mohamed Elashri",
"author_email": "Mohamed Elashri <txm@elashri.com>",
"download_url": "https://files.pythonhosted.org/packages/bc/f9/d30e05078d9354346b0641eaea8bd84eaf88d65eaf7104b744e67123348a/txm-0.1.0.tar.gz",
"platform": null,
"description": "# txm - A Tmux Helper Tool\n\n`txm` is a command-line utility to make working with [tmux](https://github.com/tmux/tmux/wiki) more efficient and user-friendly. It's written in Python and aims to abstract some of the complexities involved in managing tmux sessions, panes, and command executions.\n\n## Table of Contents\n\n- [txm - A Tmux Helper Tool](#txm---a-tmux-helper-tool)\n - [Table of Contents](#table-of-contents)\n - [Installation](#installation)\n - [Usage](#usage)\n - [Session Management](#session-management)\n - [Create a New Session](#create-a-new-session)\n - [List All Sessions](#list-all-sessions)\n - [Attach to a Session](#attach-to-a-session)\n - [Detach from a Session](#detach-from-a-session)\n - [Pane Management](#pane-management)\n - [Split Pane Vertically](#split-pane-vertically)\n - [Split Pane Horizontally](#split-pane-horizontally)\n - [Navigate Between Panes](#navigate-between-panes)\n - [Command Execution](#command-execution)\n - [Execute a Command](#execute-a-command)\n - [Configuration](#configuration)\n - [.txm-config.json](#txm-configjson)\n - [.txm-presets.json](#txm-presetsjson)\n - [Contributing](#contributing)\n - [License](#license)\n## Installation\n\nTo install `txm`, navigate to the root directory of the project and execute the following command:\n\n```bash\npip install .\n```\n\nThis will build the package and install it. Also the package is temporarily available on pypitest (to move it later to pypi)\n\n```\npip install -i https://test.pypi.org/simple/ txm\n```\n## Usage\n\nHere are the available functionalities of `txm`.\n\n### Session Management\n\n#### Create a New Session\n\nTo create a new session, run:\n\n```bash\ntxm new [SESSION_NAME]\n```\n\n#### List All Sessions\n\nTo list all available sessions, run:\n\n```bash\ntxm list\n```\n\n#### Attach to a Session\n\nTo attach to an existing session, run:\n\n```bash\ntxm attach [SESSION_NAME]\n```\n\n#### Detach from a Session\n\nTo detach from the current session, run:\n\n```bash\ntxm detach\n```\n\n### Pane Management\n\n#### Split Pane Vertically\n\nTo split the current pane vertically, run:\n\n```bash\ntxm vsplit\n```\n\n#### Split Pane Horizontally\n\nTo split the current pane horizontally, run:\n\n```bash\ntxm hsplit\n```\n\n#### Navigate Between Panes\n\nTo navigate between panes, run:\n\n```bash\ntxm navigate [DIRECTION]\n```\n`DIRECTION` can be one of the following: `U` for up, `D` for down, `L` for left, `R` for right.\n\n### Command Execution\n\n#### Execute a Command\n\nTo execute a command in the current pane, run:\n\n```bash\ntxm run [COMMAND]\n```\n\n## Configuration\n\n`txm` can optionally read from a `.txm-config.json` file located in the root directory for user-specific settings. \n\n### .txm-config.json\nThis configuration file contains settings and preferences for your TXM utility. It should be placed in the root directory of your project or your home directory.\n\n**Default Template:** \n\n```json \n{\n \"tmux_path\": \"/usr/local/bin/tmux\",\n \"log_directory\": \"logs/\",\n \"default_session_name\": \"my_session\"\n}\n```\n\n- **tmux_path**: Specifies the path to the tmux executable.\n- **log_directory**: Specifies the directory where tmux pane logs will be saved.\n- **default_session_name**: Specifies the default name for a new tmux session.\n\n\n### .txm-presets.json\nThis file holds the saved tmux session presets. It will be automatically generated by the `txm save` command, or you can create it manually in the directory of your choice.\n\n**Default Template:**\n\n```json\n{\n \"presets\": [\n {\n \"name\": \"preset_1\",\n \"windows\": [\n {\n \"name\": \"window_1\",\n \"panes\": [\"command1\", \"command2\"]\n },\n {\n \"name\": \"window_2\",\n \"panes\": [\"command3\", \"command4\"]\n }\n ]\n }\n ]\n}\n```\n\n- **name**: Specifies the name of the saved preset.\n- **windows**: Array of windows in the preset.\n - **name**: Name of the window.\n - **panes**: Array of commands to run in each pane.\n## Contributing\n\nContributions are welcome. Feel free to open a pull request or submit an issue.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE.md file for details.\n",
"bugtrack_url": null,
"license": "GPL-3.0",
"summary": "A CLI utility for tmux",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/MohamedElashri/txm/issues",
"Homepage": "https://github.com/MohamedElashri/txm"
},
"split_keywords": [
"tmux",
"cli",
"utility",
"terminal",
"multiplexer",
"terminal multiplexer",
"terminal multiplexing"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "26d475dce40e58ac180f8699e8e8e899c55f147799f4a4b03ba781d8c5588ca0",
"md5": "166d6642fd509cf793648c5feeca5e0d",
"sha256": "d485f19faaf3bdc1816d2c3c9cdccac32a757b7333dc65e7d25ee9579c4a6562"
},
"downloads": -1,
"filename": "txm-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "166d6642fd509cf793648c5feeca5e0d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 19734,
"upload_time": "2023-10-15T19:42:28",
"upload_time_iso_8601": "2023-10-15T19:42:28.717827Z",
"url": "https://files.pythonhosted.org/packages/26/d4/75dce40e58ac180f8699e8e8e899c55f147799f4a4b03ba781d8c5588ca0/txm-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bcf9d30e05078d9354346b0641eaea8bd84eaf88d65eaf7104b744e67123348a",
"md5": "7f0a73611227541d1e0de097a2679488",
"sha256": "ac0177bdb304e3a1c20e4488ed0eb5ed28ff9c4b11ac3979f3b903a545513edc"
},
"downloads": -1,
"filename": "txm-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "7f0a73611227541d1e0de097a2679488",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19740,
"upload_time": "2023-10-15T19:42:30",
"upload_time_iso_8601": "2023-10-15T19:42:30.179165Z",
"url": "https://files.pythonhosted.org/packages/bc/f9/d30e05078d9354346b0641eaea8bd84eaf88d65eaf7104b744e67123348a/txm-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-15 19:42:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MohamedElashri",
"github_project": "txm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "txm"
}