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.7 KiB
Plaintext
92 lines
2.7 KiB
Plaintext
![]()
12 years ago
|
################################################################################
|
||
|
# 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
|
||
![]()
4 years ago
|
set -sg escape-time 0
|
||
![]()
12 years ago
|
|
||
![]()
4 years ago
|
set-option -g history-limit 50000
|
||
![]()
5 years ago
|
|
||
![]()
12 years ago
|
# 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" #colour75 is an awesome blue
|
||
|
set -g status-right "#[fg=colour75]%F %l:%M%P" #colour75 is an awesome blue
|
||
|
|
||
|
setw -g monitor-activity on
|
||
|
set -g visual-activity on
|
||
|
|
||
![]()
8 years ago
|
set-option -g mouse on
|
||
|
|
||
![]()
12 years ago
|
################################################################################
|
||
|
# Colors
|
||
|
################################################################################
|
||
|
set -g default-terminal "screen-256color"
|
||
![]()
4 years ago
|
set -g terminal-overrides ",xterm-256color:Tc"
|
||
![]()
12 years ago
|
|
||
|
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
|
||
![]()
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
|
||
|
|
||
|
# Linux
|
||
![]()
5 years ago
|
#bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
|
||
|
#bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard"
|
||
![]()
5 years ago
|
|
||
|
# macOS
|
||
![]()
4 years ago
|
#bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
|
||
|
#bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"
|
||
![]()
12 years ago
|
|
||
|
# Make switch session shortcut repeatable
|
||
|
bind -r ( switch-client -p
|
||
|
bind -r ) switch-client -n
|
||
|
|
||
|
# Reload config with prefix r
|
||
![]()
4 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
|
||
|
|
||
|
# Create panes bindings
|
||
|
bind | split-window -h
|
||
![]()
5 years ago
|
bind \\ split-window -h
|
||
![]()
12 years ago
|
bind - split-window -v
|
||
|
|
||
|
# Vim bindings
|
||
|
bind h select-pane -L
|
||
|
bind j select-pane -D
|
||
|
bind k select-pane -U
|
||
|
bind l select-pane -R
|
||
|
|
||
|
bind -r H resize-pane -L 5
|
||
|
bind -r J resize-pane -D 5
|
||
|
bind -r K resize-pane -U 5
|
||
|
bind -r L resize-pane -R 5
|
||
|
|
||
|
bind -r C-h select-window -t :-
|
||
|
bind -r C-l select-window -t :+
|
||
![]()
4 years ago
|
|
||
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH $XDG_CONFIG_HOME/tmux/plugins
|
||
|
|
||
|
set -g @plugin 'tmux-plugins/tmux-yank'
|
||
|
|
||
|
run $XDG_CONFIG_HOME/tmux/plugins/tpm/tpm
|