Tmux
Window operations
ctrl+b c
- spawn new windowctrl+b n
- move to next windowctrl+b p
- move to previous windowctrl+b 0..9
- switch to window by numberctrl+b x
- kill current window
Panes
ctrl+b %
- spawn new pane horizontallyctrl+b "
- spawn new pane vertically"ctrl+b arrow_key
- switch through panesctrl+b ctrl + arrow_key
- resize panectrl+b o
- switch to next panectrl+b loong o
- switch panes :sunglasses:ctrl+b space
- toggle pane layoutsctrl+b !
- convert pane into a windowctrl+b x
- kill current panectrl+b { or }
- Move the panes
Tms written in rust (https://github.com/jrmoulton/tmux-sessionizer)
Very useful for fuzzy finding git projects in your filesystem.
tms config --paths /home/<user>/Documents/
then just run tms and fuzzy find your project. The tms will then create a new session for you and also activate venv if you have it configured. Which is awesome.
Rename pane :)
ctrl+b ,
Multiple ssh servers ?
no problem
#!/bin/bash
ssh_list=( user1@server1 user2@server2 ... )
split_list=()
for ssh_entry in "${ssh_list[@]:1}"; do
split_list+=( split-pane ssh "$ssh_entry" ';' )
done
tmux new-session ssh "${ssh_list[0]}" ';' \
"${split_list[@]}" \
select-layout tiled ';' \
set-option -w synchronize-panes
Source updated config file?
:source-file ~/.tmux.conf
Problems on server?
root@ml-node:~# tmux
missing or unsuitable terminal: alacritty
# Fix, export a terminal variable
export TERM=xterm-256color