Tmux
Below prefix
is mentioned multiple times. By default it is <C-b>
which is ctrl
+ b
.
It can be remapped to other key, i like to use ctrl
+ a
:
set -g prefix C-a
Detach from specific session
You can choose which session to detach with prefix
+ D
(uppercase D
)
List all key bindings
tmux list-keys
or within tmux
:list-keys
or
`prefix` + `?`
Kill window
prefix
+ &
Kill pane
prefix
+ x
Change color of one pane
select-pane -t:.1 -P 'fg=red,bg=white'
Extract current pane into new window
prefix
+ !
Move pane to somewhere else
- go to pane you want to move
- mark it with
prefix + m
- go to destination window/session
:join-pane
Disable status bar
- Open command prompt with prefix+: (in my case prefix is ctrl+a, so full command is ctrl+a+:)
set -g status off
split programatically
tmux split-window "echo hey"
This will work but close immediatelly after echo
To keep it open:
tmux set-option remain-on-exit on
tmux split-window "echo hey"