diff options
Diffstat (limited to '.config/tmux/tmux.conf')
| -rw-r--r-- | .config/tmux/tmux.conf | 91 |
1 files changed, 68 insertions, 23 deletions
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 42a44b4..a99f6ae 100644 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -1,41 +1,86 @@ -# -g for global -# -n to not require prefix key - -# Source bashrc -set-option -g default-command $SHELL +############################## +########## KEYBINDS ########## +############################## -# Set base index to 1 -set -g base-index 1 -set-window-option -g pane-base-index 1 +#----- SYSTEM -----# +# [Alt-space] Prefix key +unbind C-b +set-option -g prefix M-Space +bind M-Space send-prefix -# Prefix-r to reload configuration +# [Prefix-r] Reload configuration bind r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloaded" -# Enable mouse controls -set -g mouse on +#----- SESSIONS -----# +# `tmux a` to attach session +# [Prefix-s] Session selector +# [Prefix-d] Detach session -# Prefix key to Ctrl-Space -unbind C-b -set-option -g prefix M-Space -bind M-Space send-prefix +# [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 -# Prefix-v/h to create panes +#----- PANES -----# +# [Prefix-v/h] Create new pane bind v split-window -h bind h split-window -v -# Alt-arrow to switch panes +# [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 -# Ctrl-arrow to switch windows -bind -n C-h previous-window -bind -n C-l next-window +################################### +########## SYSTEM CONFIG ########## +################################### -# Ctrl-Shift-arrow to change window order -bind -n C-S-h swap-window -t -1 \; previous-window -bind -n C-S-l swap-window -t +1 \; next-window +# 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 |
