my [basic] tmux config, with comment containing default keybindings.
$sudo apt install tmux || slapt-get --install tmux
You need to install tpm (tmux plugin manager) https://github.com/tmux-plugins/tpm and catppuccin (fancy stuff, see config) https://github.com/catppuccin/tmux
catppuccin needs a patched font installed on the system to display icons correctly; these are not displayed correctly in the code below because the font is missing here, but get them from https://www.nerdfonts.com/font-downloads
The rest of the instructions are in the file below saved as .tmux.conf in the Linux user $HOME directory.
If you don’t want to bind leader+r to reload the config, use tmux source ~/.tmux.conf
while tmux is running in terminal
# ######################################################
# On a new install:
# 1. In a terminal: $ tmux killall; tmux source # #.tmux.conf; vim .tmux.conf
# In a tmux session: ctrl+b then r, then ctrl+b #shift+i
# ######################################################
# leader is ctr + b.
# On a new install:
# re-load this config on leader -r
# Do " ctrl+b > r " every time you make changes.
unbind r
bind r source-file ~/.tmux.conf
# You _could_ set this to ctrl + s, where -g = global
# set -g prefix C-s
# allow mouse to resize panes
set -g mouse on
# Allow moving to a pane with the mouse.
set-option -g focus-events on
# yank plugin copies to clickboard on selection
set -g @yank_selection_mouse 'clipboard'
# ## Bind keys to actions ##
# Navigation - (leader= ctrl+b) > Left, Up, Down, Right.
bind-key h select-pane -L
bind-key j select-pane -U
bind-key k select-pane -D
bind-key l select-pane -R
# unbind %
# bind | split-window -h # h for horizontal
# unbind '"' # that's a " in singles quotes btw
# bind | split-window -v # v for vertizontalliopi
# set pane index to start:1 not 0, re-number panes on close
set -g base-index 1
set -g renumber-windows on
setw -g pane-base-index 1
# allow more colours
set -g default-terminal 'screen-256color' #screen
set-option -as terminal-features ',xterm-256color:RGB'
# Layout catppuccin
set-option -g status-position top
set -g @catppuccin_window_left_separator "█"
set -g @catppuccin_window_right_separator "█ "
set -g @catppuccin_window_number_position "right"
set -g @catppuccin_window_middle_separator " █"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_window_current_text "#{pane_current_path}"
set -g @catppuccin_status_modules_right "application session date_time"
set -g @catppuccin_status_left_separator ""
set -g @catppuccin_status_right_separator " "
set -g @catppuccin_status_fill "all"
set -g @catppuccin_status_connect_separator "yes"
# List of plugins, ctrl+b > I to install
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'catppuccin/tmux'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Do not uncomment anything in this section
# the run command above has to be last executable line
# Keybinding Reference
# C-b C-b Send the prefix key
# C-b C-o Rotate through the panes
# C-b C-z Suspend the current client
# C-b Space Select next layout
# C-b ! Break pane to a new window
# C-b " Split window vertically
# C-b # List all paste buffers
# C-b $ Rename current session
# C-b % Split window horizontally
# C-b & Kill current window
# C-b ' Prompt for window index to select
# C-b ( Switch to previous client
# C-b ) Switch to next client
# C-b , Rename current window
# C-b - Delete the most recent paste buffer
# C-b . Move the current window
# C-b / Describe key binding
# C-b 0 Select window 0 (window=pane?)
# C-b 1 Select window 1
# C-b 2 Select window 2
# C-b 3 Select window 3
# C-b 4 Select window 4
# C-b 5 Select window 5
# C-b 6 Select window 6
# C-b 7 Select window 7
# C-b 8 Select window 8
# C-b 9 Select window 9
# C-b : Prompt for a command
# C-b ; Move to the previously active pane
# C-b = Choose a paste buffer from a list
# C-b ? List key bindings
# C-b C Customize options
# C-b D Choose a client from a list