Skip to content

Instantly share code, notes, and snippets.

@rougeth
Created March 11, 2016 18:55
Show Gist options
  • Save rougeth/db185fc21c376ece8fc6 to your computer and use it in GitHub Desktop.
Save rougeth/db185fc21c376ece8fc6 to your computer and use it in GitHub Desktop.
talk about tmux
  _____/\\\______________________________________________________
   __/\\\\\\\\\\\____/\\\\\__/\\\\\____/\\\____/\\\__/\\\____/\\\_
    _\////\\\////___/\\\///\\\\\///\\\_\/\\\___\/\\\_\///\\\/\\\/__
     ____\/\\\______\/\\\_\//\\\__\/\\\_\/\\\___\/\\\___\///\\\/____
      ____\/\\\_/\\__\/\\\__\/\\\__\/\\\_\/\\\___\/\\\____/\\\/\\\___
       ____\//\\\\\___\/\\\__\/\\\__\/\\\_\//\\\\\\\\\___/\\\/\///\\\_
        _____\/////____\///___\///___\///___\/////////___\///____\///__

The Terminal Multiplexer

Marco Rougeth marco@rougeth.com

https://tmux.github.io


  • tmux
  • ctrl-b to rule them all

Windows

 ------------------
|                  |
|                  |
|        W         |
|                  |
|                  |
 ------------------
  • ctrl-b c nova janela
  • ctrl-b , renomear janela
  • ctrl-b n mover para próxima janela
  • ctrl-b p mover para janela anterior
  • ctrl-b w lista todas janelas abertas

Panes

 ------------------
|                  |
|        P         |
|                  |
|------------------|
|        |         |
|   P    |    P    |
|        |         |
 ------------------
  • ctrl-b % split vertical
  • ctrl-b " split horizontal
  • ctrl-b o próximo pane
  • ctrl-b { move pane para esquerda
  • ctrl-b } move pane para direita
  • ctrl-b q mostra número dos panes

Extras

  • ctrl-b z pane fullscreen
  • selecionando panes com vim style
    # ~/.tmux.conf
    bind h select-pane -L
    bind j select-pane -D
    bind k select-pane -U
    bind l select-pane -R
    
  • tmux ls lista sessões
  • ctrl-b d detach sessão
  • tmux attach -t <sessão> attach sessão
  • ctrl-b t mostra hora

tmuxp - tmux session manager

http://tmuxp.readthedocs.org

  • arquivo de configuração: .tmuxp.{json,yaml}
  • tmuxp load .
session_name: batalha_naval
windows:
  - panes:
    - focus: true
      shell_command:
        - workon dojos
        - vim batalha_naval.py
    - shell_command:
        - workon dojos
        - semaphore.py batalha_naval

tmate - Instant Terminal Sharing

https://tmate.io

  • tmate
  • tmate show-messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment