https://github.com/sensorario/ttmux
A script that make easy tmux configuration bootstrap of a project
https://github.com/sensorario/ttmux
Last synced: 12 months ago
JSON representation
A script that make easy tmux configuration bootstrap of a project
- Host: GitHub
- URL: https://github.com/sensorario/ttmux
- Owner: sensorario
- License: mit
- Created: 2015-04-16T19:12:46.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-10T10:06:18.000Z (almost 8 years ago)
- Last Synced: 2025-04-02T07:41:27.026Z (about 1 year ago)
- Language: Shell
- Size: 43 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ttmux
A script that make easy tmux configuration bootstrap of a project
## Install ttmux
To make ttmux executable from everywhere, add a symbolic link your /usr/local/bin folder
# cd /usr/local/bin
# ln -s ~/path/to/sensorario/ttmux/ttmux .
## tmux configuration
Add these lines to your tmux.conf file, ore create it if not exists.
```bash
# start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
```
## configuration
This example create a basic configurtion where, ...
- github checkout master branch
- session is named "ttmux"
- workspace windows will have a 20% pane, on the bottom
```bash
declare -A window_list=()
declare -A horizontal_panes=()
declare -A horizontal_panes_command=()
declare -A horizontal_panes_command_position=()
session_name="ttmux"
project_path='/path/to/project/folder'
window_list+=([workspace]="cd $project_path; vim")
window_list+=([mysql]="mysql -uroot sensorario")
window_list+=([console]="cd $project_path")
horizontal_panes+=([workspace]="")
horizontal_panes_command+=([workspace]="")
horizontal_panes_command_position+=([workspace]=2)
ordered_windows=(
workspace
mysql
console
)
```
## `Tmux snippets`
- open horizontal pane `Ctrl-b + "`
- open vertical pane `Ctrl-b + %`