Tmuxctl launches configured tmux sessions, so you can stop create over and over the same sessions.
You can install Tmuxctl with one of the methods bellow.
The recommended method is to run the following command, which installs tmuxctl
in ./bin/tmuxctl by default.
$ curl -sf https://raw.githubusercontent.com/alexandrebodin/tmuxctl/master/install.sh | sh
To install tmuxctl
in a specific folder run:
$ curl -sf https://raw.githubusercontent.com/alexandrebodin/tmuxctl/master/install.sh | BINDIR=/usr/local/bin sh
You can install tmuxctl
using go get
$ go get github.com/alexandrebodin/tmuxctl $ cd $GOPATH/src/github.com/alexandrebodin/tmuxctl $ dep ensure -vendor-only $ go install
Finally you can install it manually from one of the releases from github
Tmuxctl uses config files to start a session.
Start by creating a toml config file (by default tmuxctl
will look for a .tmuxctlrc
in the current dir, up the parent directories)
name="azdaz" [[windows]] name="win-1"
You can see more examples in the examples folder
Tmuxctl works with configuration files. Here is the list of possible options
You can set a session name
name="session-name"
You can set a base directory for your windows
dir="~/zad"
You can choose which window to attach to on start
select-window="window-name"
You can choose which pane to attach to on start (the index of the pane in the window starting from 1)
select-pane=2
You can clear the panes (C-l) after initialisation
clear-panes=true
You can run scripts in every window (runs before anything else in a window)
window-scripts=[ "cd folder", "ls -larth" ]
You can add windows like follow
name="session-name" [[windows]] [[windows]] [[windows]]
You can give a name to a window
name="window-name"
You can start a window in a directory (every pane in this window will start there by default)
dir="/some-dir"
You can run scripts in the window before it is splitted in panes (they will run once)
scripts=[ "do sth" ]
You can run scripts in every pane of a window if needed
pane-scripts=[ "do sth" ]
You can synchronize all the panes of a window
sync=true
You can declare all the paes you want to have in a window
name="session-name" [[windows]] name="window-name" [[windows.panes]] [[windows.panes]] [[windows.panes]]
You can start a pane in a specific dir
dir="/some-dir"
You can run a list of scripts in a specific pane
scripts=["do stuff"]
You can specify the split options to setup a pane size. See the docs for split-window options
split="-f -h"
You can set a pane as zoomed (only visible pane in the window) on startup
zoom=true