Skip to content

Instantly share code, notes, and snippets.

@mikejoh
Created September 1, 2021 09:24
Show Gist options
  • Save mikejoh/1e8993ad1aabe38108e03d73a0cae2f5 to your computer and use it in GitHub Desktop.
Save mikejoh/1e8993ad1aabe38108e03d73a0cae2f5 to your computer and use it in GitHub Desktop.
TMUX setup revisited

~/.tmux.conf:

# Bindings
unbind C-b
unbind '"'
unbind %
set -g prefix C-a
bind C-a send-prefix
bind-key R source ~/.tmux.conf \; display-message "tmux.conf reloaded."
bind e setw synchronize-panes on
bind E setw synchronize-panes off
bind k confirm kill-window
bind K confirm kill-server
bind | split-window -h -c '#{pane_current_path}' # vertical pane
bind - split-window -v -c '#{pane_current_path}' # horizontal pane
bind t set-option status
bind r source ~/.tmux.conf\; display "~/.tmux.conf sourced!"
bind -n S-Left  previous-window
bind -n S-Right next-window
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

# Set zsh as default shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh

# General
set -g default-terminal "xterm-256color"
set -s escape-time 10 
set -s focus-events on
set-option -g history-limit 100000
setw -g mouse on

# Display
set -g base-index 1
setw -g pane-base-index 1
setw -g automatic-rename on
set -g status-interval 10
set -g set-titles on

# Activity
setw -g monitor-activity on
set -g visual-activity on

# Status bar
set -g status-style "bg=black"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin "arcticicestudio/nord-tmux"

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment