Adel ALLAM @apges01

tmux


sessions


# open or create session named 'basique'
$ tmux new -A -s basique 

# kill
$ tmux kill-session -t basique

# rename
$ ctrl + b + $

# list sessions
$ tmux ls
$ ctrl + b + s

# dettach
$ ctrl + b + d
$ tmux detach

# attach
$ tmux attach -t basique  

# jump
$ ctrl + b + ( # move to previous  
$ ctrl + b + ) # move to next 

windows


# create
$ ctrl + b + c

# rename
$ ctrl + b + ,

# close
$ ctrl + b + &

# show tree
$ ctrl + b + w  

# next
$ ctrl + b + n  

# previous
$ ctrl + b + p  

# switch
$ ctrl + b + 0-9  

III - Panes


# go-back to previous pane
$ ctrl + b + ;

# vertical split
$ ctrl + b + %

# horizontal split
$ ctrl + b + \"

# deplacement
$ ctrl + b + fleche  

# zoom (toggle)
$ ctrl + b + z

# close
$ ctrl + b + x

# scroll mode
$ ctrl + b + [

# resize
$ ctrl + b + :
:resize-pane -D # down
:resize-pane -U # up
:resize-pane -L # left
:resize-pane -R # right


~/.tmux.conf


# set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=colour250,bg=black'

# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none

#  modes
setw -g clock-mode-colour colour5
setw -g mode-attr bold
setw -g mode-fg colour1
setw -g mode-bg colour18

# panes
set -g pane-border-bg colour235
set -g pane-border-fg colour238
set -g pane-active-border-bg colour236
set -g pane-active-border-fg colour51

# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-bg colour4
set -g status-fg colour137
set -g status-attr dim
set -g status-left ''
set -g status-right '#[fg=colour137,bg=colour0,bold] %d/%m #[fg=colour137,bg=colour0,bold]| %H:%M '
set -g status-right-length 50
set -g status-left-length 20

setw -g window-status-current-fg colour1
setw -g window-status-current-bg colour23
setw -g window-status-current-attr bold
setw -g window-status-current-format ' #I#[fg=colour137]:#[fg=colour255]#W#[fg=colour249]#F '

setw -g window-status-fg colour9
setw -g window-status-bg colour8
setw -g window-status-attr none
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '

setw -g window-status-bell-attr bold
setw -g window-status-bell-fg colour255
setw -g window-status-bell-bg colour1

# messages
set -g message-attr bold
set -g message-fg colour232
set -g message-bg colour16

# mouse support
set -g mouse on

# don't rename windows automatically
set-option -g allow-rename off