tmuxinator
- Config sample (en_US)
- Exemplo de configuração (pt_BR)
# /home/davi-moreira/.config/tmuxinator/sample.yml | |
# Comments in en_US | |
name: sample | |
root: ~/Projects/etc/sample | |
# This will keep your local clone/fork always up-to-date with the remote repository. | |
on_project_start: git fetch --all | |
# Telling tmuxinator which is the main window. | |
startup_window: VIM | |
# Below we have only 3 windows: | |
# - The first one, named `VIM`, opens the editor. | |
# - The second one, named `ENV`, is dedicated to the local environment - in this case, a Docker-based environment. | |
# - The third one, named `GIT`, is dedicated to VCS. Here we have 3 panes: | |
# - The top pane, named `CURRENT_STATUS`, will display the current status of your work. | |
# - The bottom pane, named `FILES_AND_TIME`, is splitted in two other panes: | |
# - The bottom-left pane runs a Git command to display what's been added to your current work, with a list of only added and modified files, comparing the local branch against the remote's origin master branch. | |
# - And the bottom-right pane will display the current time, just because I'm too lazy to look at the OS toolbar (mine is always hidden) or the cellphone (avoiding distractions!) | |
# Notice that all these panes are created using a few tmux commands, by splitting, resizing and executing commands in your terminal. Pretty nice, eh? | |
windows: | |
- VIM: vim . | |
- ENV: docker-compose ps | |
- GIT: | |
layout: main-horizontal | |
panes: | |
- CURRENT_STATUS: | |
- git status | |
- FILES_AND_TIME: | |
- tmux split-window -t 2.1 -h | |
- tmux resize-pane -t 2.1 -R 40 | |
- tmux clock-mode -t 2.2 | |
- tmux send-keys -t 2.1 "git diff origin/master...`git rev-parse --abbrev-ref HEAD` --name-only --diff-filter=AM" Enter |
# /home/davi-moreira/.config/tmuxinator/sample.yml | |
# Comentários em pt_BR | |
name: sample | |
root: ~/Projects/etc/sample | |
# Isto vai manter o seu repositório local sempre atualizado com as referências do que está remoto. | |
on_project_start: git fetch --all | |
# Aqui dizemos para o tmuxinator qual é a janela principal. | |
startup_window: VIM | |
# Abaixo temos 3 janelas: | |
# - A primeira, chamada `VIM`, abre o editor. | |
# - A segunda, chamada `ENV`, é dedicada para o ambiente local - neste caso, um ambiente baseado em Docker. | |
# - A terceira, chamada `GIT`, é dedicada para o controle de versão. Aqui temos 3 painéis: | |
# - O painel do topo, chamado `CURRENT_STATUS`, vai exibir o estado atual do seu trabalho. | |
# - O painel de baixo, chamado `FILES_AND_TIME`, é dividido em dois outros painéis: | |
# - O painel da esquerda executa um comando do Git para exibir o que já foi feito no seu trabalho atual, com uma lista somente dos arquivos modificados e adicionados, comparando o branch local contra o branch master do repositório remoto. | |
# - E o painel da direita exibe a hora atual, só porque eu sou preguiçoso demais pra olhar para o relógio do sistema (sempre deixo a barra do SO oculta) ou no celular (assim evito distrações!) | |
# Perceba que todos esses painéis são criados usando alguns comandos do tmux, dividindo, aumentando e executando comandos no terminal. Bacana né? | |
windows: | |
- VIM: vim . | |
- ENV: docker-compose ps | |
- GIT: | |
layout: main-horizontal | |
panes: | |
- CURRENT_STATUS: | |
- git status | |
- FILES_AND_TIME: | |
- tmux split-window -t 2.1 -h | |
- tmux resize-pane -t 2.1 -R 40 | |
- tmux clock-mode -t 2.2 | |
- tmux send-keys -t 2.1 "git diff origin/master...`git rev-parse --abbrev-ref HEAD` --name-only --diff-filter=AM" Enter |