TMUXCTL tmux session builder

Introduction

Tmuxctl launches configured tmux sessions, so you can stop create over and over the same sessions.

Installation

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

Getting started

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

Configuration

Tmuxctl works with configuration files. Here is the list of possible options

name

You can set a session name

name="session-name"

dir

You can set a base directory for your windows

dir="~/zad"

select-window

You can choose which window to attach to on start

select-window="window-name"

select-pane

You can choose which pane to attach to on start (the index of the pane in the window starting from 1)

select-pane=2

clear-panes

You can clear the panes (C-l) after initialisation

clear-panes=true

window-scripts

You can run scripts in every window (runs before anything else in a window)

window-scripts=[
  "cd folder",
  "ls -larth"
]

[[windows]]

You can add windows like follow

name="session-name"

[[windows]]

[[windows]]

[[windows]]

name

You can give a name to a window

name="window-name"

dir

You can start a window in a directory (every pane in this window will start there by default)

dir="/some-dir"

scripts

You can run scripts in the window before it is splitted in panes (they will run once)

scripts=[
  "do sth"
]

pane-scripts

You can run scripts in every pane of a window if needed

pane-scripts=[
  "do sth"
]

sync

You can synchronize all the panes of a window

sync=true

[[windows.panes]]

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]]

dir

You can start a pane in a specific dir

dir="/some-dir"

scripts

You can run a list of scripts in a specific pane

scripts=["do stuff"]

split

You can specify the split options to setup a pane size. See the docs for split-window options

split="-f -h"

zoom

You can set a pane as zoomed (only visible pane in the window) on startup

zoom=true