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.
92 lines
2.8 KiB
Cheetah
92 lines
2.8 KiB
Cheetah
2 years ago
|
{{ if lookPath "tmux" -}}
|
||
12 years ago
|
################################################################################
|
||
4 years ago
|
# Base configuration
|
||
12 years ago
|
################################################################################
|
||
|
# Use Ctrl-a as a prefix instead of Ctrl-b
|
||
|
set -g prefix C-a
|
||
|
unbind C-b
|
||
|
|
||
|
# More responsive with sending commands
|
||
2 years ago
|
set -sg escape-time 0
|
||
12 years ago
|
|
||
3 years ago
|
set-option -g history-limit 500000
|
||
4 years ago
|
|
||
12 years ago
|
# Start counting at 0, easier for keyboard shortcuts
|
||
|
set -g base-index 1
|
||
2 years ago
|
set -g pane-base-index 1
|
||
12 years ago
|
set-window-option -g pane-base-index 1
|
||
2 years ago
|
set-option -g renumber-windows on
|
||
12 years ago
|
|
||
|
# Status
|
||
2 years ago
|
set -g status-interval 5
|
||
|
set -g status-keys emacs
|
||
12 years ago
|
set -g status-justify centre
|
||
|
|
||
4 years ago
|
set -g status-left "#[fg=colour75]#S:#I.#P"
|
||
|
set -g status-right "#{prefix_highlight} #[fg=colour75]#S:#I.#P %F %l:%M%P"
|
||
12 years ago
|
|
||
|
setw -g monitor-activity on
|
||
|
set -g visual-activity on
|
||
|
|
||
8 years ago
|
set-option -g mouse on
|
||
|
|
||
12 years ago
|
################################################################################
|
||
4 years ago
|
# Colors
|
||
12 years ago
|
################################################################################
|
||
2 years ago
|
{{ if eq .chezmoi.os "darwin" -}}
|
||
4 years ago
|
run $XDG_CONFIG_HOME/tmux/plugins/macos-color-workaround
|
||
2 years ago
|
{{ end }}
|
||
12 years ago
|
set -g status-fg white
|
||
|
set -g status-bg black
|
||
|
|
||
|
################################################################################
|
||
4 years ago
|
# Custom bindings
|
||
12 years ago
|
################################################################################
|
||
4 years ago
|
|
||
12 years ago
|
# Have buffers be more like vim buffers
|
||
|
setw -g mode-keys vi
|
||
|
unbind [
|
||
|
bind Escape copy-mode
|
||
|
unbind p
|
||
|
bind p paste-buffer
|
||
5 years ago
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||
|
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||
2 years ago
|
bind-key -T copy-mode-vi 'q' send -X rectangle-toggle
|
||
5 years ago
|
|
||
12 years ago
|
# Make switch session shortcut repeatable
|
||
|
bind -r ( switch-client -p
|
||
|
bind -r ) switch-client -n
|
||
|
|
||
|
# Reload config with prefix r
|
||
2 years ago
|
bind r source-file $XDG_CONFIG_HOME/tmux/tmux.conf \; display "Reloaded"
|
||
12 years ago
|
|
||
|
# Send prefix to the terminal
|
||
|
bind C-a send-prefix
|
||
|
|
||
|
bind -r C-h select-window -t :-
|
||
|
bind -r C-l select-window -t :+
|
||
4 years ago
|
|
||
4 years ago
|
################################################################################
|
||
|
# Plugins
|
||
|
################################################################################
|
||
|
|
||
4 years ago
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH $XDG_DATA_HOME/tmux/plugins
|
||
4 years ago
|
|
||
2 years ago
|
set -g @plugin 'tmux-plugins/tmux'
|
||
4 years ago
|
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'
|
||
4 years ago
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||
|
|
||
4 years ago
|
# 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'
|
||
|
|
||
4 years ago
|
run $XDG_CONFIG_HOME/tmux/plugins/tpm/tpm
|
||
2 years ago
|
{{- end }}
|