############################## ########## KEYBINDS ########## ############################## #----- SYSTEM -----# # [Alt-space] Prefix key unbind C-b set-option -g prefix M-Space bind M-Space send-prefix # [Prefix-r] Reload configuration bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded" #----- SESSIONS -----# # `tmux a` to attach session # [Prefix-s] Session selector # [Prefix-d] Detach session # [Prefix-S] Create new session bind S command-prompt -p "New Session:" "new-session -A -s '%%'" # [Prefix-K] Kill current session bind K confirm kill-session # [Prefix-R] Set session default filesystem location bind R attach-session -c '#{pane_current_path}' \; display-message "New default location set" #----- WINDOWS -----# # [Ctrl-c] Create new window # [Ctrl-h/l] Switch windows bind -n C-h previous-window bind -n C-l next-window # [Ctrl-Alt-h/l] Change window order bind -n C-M-h swap-window -t -1 \; previous-window bind -n C-M-l swap-window -t +1 \; next-window #----- PANES -----# # [Prefix-v/h] Create new pane bind v split-window -h bind h split-window -v # [Alt-h/j/k/l] to switch panes bind -n M-h select-pane -L bind -n M-l select-pane -R bind -n M-k select-pane -U bind -n M-j select-pane -D ################################### ########## SYSTEM CONFIG ########## ################################### # Source bashrc set-option -g default-command $SHELL # Set base index to 1 set -g base-index 1 set-window-option -g pane-base-index 1 # Synchronize panes set -s command-alias[100] 'sync=set-window-option synchronize-panes' # Enable mouse controls set -g mouse on #################################### ########## DISPLAY CONFIG ########## #################################### # Status bar set-option -g status-right "" set-option -g status-position top # Set status bar colors set-option -g status-style "fg=white,bg=black" set-option -g window-status-current-style "fg=black,bg=white" ########################### ########## INDEX ########## ########################### # -g for global # Prefix key prepends any keybinds by default # -n to not require prefix key # C - CTRL key # M - ALT key