You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.5 KiB
Plaintext
83 lines
2.5 KiB
Plaintext
################################################################################
|
|
# Base configuration
|
|
################################################################################
|
|
# Use Ctrl-a as a prefix instead of Ctrl-b
|
|
set -g prefix C-a
|
|
unbind C-b
|
|
|
|
# More responsive with sending commands
|
|
set -sg escape-time 1
|
|
|
|
set-option -g history-limit 50000
|
|
|
|
# Start counting at 0, easier for keyboard shortcuts
|
|
set -g base-index 1
|
|
set-window-option -g pane-base-index 1
|
|
|
|
# Status
|
|
set -g status-interval 20
|
|
set -g status-justify centre
|
|
|
|
set -g status-left "#[fg=colour75]#S:#I.#P"
|
|
set -g status-right "#{prefix_highlight} #[fg=colour75]#S:#I.#P %F %l:%M%P"
|
|
|
|
setw -g monitor-activity on
|
|
set -g visual-activity on
|
|
|
|
set-option -g mouse on
|
|
|
|
################################################################################
|
|
# Colors
|
|
################################################################################
|
|
run $XDG_CONFIG_HOME/tmux/plugins/macos-color-workaround
|
|
set -g status-fg white
|
|
set -g status-bg black
|
|
|
|
################################################################################
|
|
# Custom bindings
|
|
################################################################################
|
|
|
|
# Have buffers be more like vim buffers
|
|
setw -g mode-keys vi
|
|
unbind [
|
|
bind Escape copy-mode
|
|
unbind p
|
|
bind p paste-buffer
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
|
|
|
# Make switch session shortcut repeatable
|
|
bind -r ( switch-client -p
|
|
bind -r ) switch-client -n
|
|
|
|
# Reload config with prefix r
|
|
bind r source-file $HOME/.tmux.conf \; display "Reloaded"
|
|
|
|
# Send prefix to the terminal
|
|
bind C-a send-prefix
|
|
|
|
bind -r C-h select-window -t :-
|
|
bind -r C-l select-window -t :+
|
|
|
|
################################################################################
|
|
# Plugins
|
|
################################################################################
|
|
|
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins
|
|
|
|
set -g @plugin 'tmux-plugins/tmux-copycat'
|
|
set -g @plugin 'tmux-plugins/tmux-open'
|
|
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
|
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
|
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
|
|
|
# O will open a file in an editor
|
|
set -g @open-editor O
|
|
|
|
set -g @prefix_highlight_show_copy_mode 'on'
|
|
set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' # default is 'fg=default,bg=yellow'
|
|
set -g @prefix_highlight_show_sync_mode 'on'
|
|
set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green' # default is 'fg=default,bg=yellow'
|
|
|
|
run $XDG_CONFIG_HOME/tmux/plugins/tpm/tpm
|