https://github.com/aaqaishtyaq/gmux
⚙️ tmux session manager and task runner.
https://github.com/aaqaishtyaq/gmux
golang tmux tool
Last synced: about 1 year ago
JSON representation
⚙️ tmux session manager and task runner.
- Host: GitHub
- URL: https://github.com/aaqaishtyaq/gmux
- Owner: aaqaishtyaq
- License: mit
- Created: 2021-12-22T08:25:09.000Z (over 4 years ago)
- Default Branch: trunk
- Last Pushed: 2023-03-16T04:00:26.000Z (over 3 years ago)
- Last Synced: 2025-01-31T16:17:27.414Z (over 1 year ago)
- Topics: golang, tmux, tool
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gmux 
Tmux session manager.
Gmux automates your [tmux](https://github.com/tmux/tmux) workflow. You can create a single configuration file, and Gmux will create all the required windows and panes from it.
## Usage
```shell
gmux [] [-f, --file ] [-w, --windows ]... [-a, --attach] [-d, --debug]
```
### Options
```console
-f, --file A custom path to a config file
-w, --windows List of windows to start. If session exists, those windows will be attached to current session.
-a, --attach Force switch client for a session
-i, --inside-current-session Create all windows inside current session
-d, --debug Print all commands to ~/.config/gmux/gmux.log
--detach Detach session. The same as `-d` flag in the tmux
```
## Examples
## Getting started
To create a new project, or edit an existing one:
```shell
% gmux new work
% gmux edit work
```
To start/stop a project and all windows:
```shell
% gmux start work
% gmux stop work
```
### Example Config
Sample config should look like this.
```yaml
session: work
root: ~/Developer/work
before_start:
- docker-compose -f work-backend/docker-compose.yml up -d # path relative to root
env:
FOO: BAR
stop:
- docker stop $(docker ps -q)
windows:
- name: code
root: work # a relative path to root
manual: true # you can start this window only manually, using the -w arg
layout: main-vertical
commands:
- docker-compose start
panes:
- type: horizontal
root: .
commands:
- vim work-backend
- name: infrastructure
root: ~/Developer/work/work-backend
layout: tiled
panes:
- type: horizontal
root: .
commands:
- docker-compose up -d
- docker-compose exec rails /bin/bash
- clear
```