Tmux session manager. Gmux automates your tmux workflow. You can create a single configuration file, and Gmux will create all the required windows and panes from it.
gmux <command> [<project>] [-f, --file <file>] [-w, --windows <window>]... [-a, --attach] [-d, --debug]
-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
To create a new project, or edit an existing one:
% gmux new work
% gmux edit work
To start/stop a project and all windows:
% gmux start work
% gmux stop work
Sample config should look like this.
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