Created
October 10, 2019 07:55
-
-
Save clarksun/e15af7b77c1f754d463adeaa8f571e11 to your computer and use it in GitHub Desktop.
tmux conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g allow-rename off | |
set-option -g default-shell "/usr/local/bin/fish" | |
set-option -g default-command "/usr/local/bin/fish" | |
# set-option -g default-command "reattach-to-user-namespace -l zsh" | |
# tmux display things in 256 colors | |
set -g default-terminal "screen-256color" | |
# automatically renumber tmux windows | |
set -g renumber-windows on | |
# unbind default prefix and set it to Ctrl + a | |
unbind C-b | |
# set -g prefix C-a | |
# bind C-a send-prefix | |
set -g prefix ` | |
# for nested tmux sessions | |
bind-key a send-prefix | |
# Activity Monitoring | |
setw -g monitor-activity off | |
set -g visual-activity off | |
# Rather than constraining window size to the maximum size of any client | |
# connected to the *session*, constrain window size to the maximum size of any | |
# client connected to *that window*. Much more reasonable. | |
setw -g aggressive-resize on | |
# make delay shorter | |
set -sg escape-time 1 | |
# make window/pane index start with 1 | |
set -g base-index 1 | |
setw -g pane-base-index 1 | |
##################### | |
### Key Bindings #### | |
##################### | |
# reload config file | |
bind r source-file ~/.tmux.conf \; display "Config Reloaded!" | |
# synchronize all panes in a window | |
bind y setw synchronize-panes | |
# pane movement shortcuts | |
bind h select-pane -L | |
bind j select-pane -D | |
bind k select-pane -U | |
bind l select-pane -R | |
bind -r C-h select-window -t :- | |
bind -r C-l select-window -t :+ | |
set -g history-limit 30000 | |
#set-window-option -g window-status-current-bg red | |
# Resize pane shortcuts | |
bind H resize-pane -L 10 | |
bind J resize-pane -D 5 | |
bind K resize-pane -U 5 | |
bind L resize-pane -R 10 | |
# enable mouse support for switching panes/windows | |
# NOTE: This breaks selecting/copying text on OSX | |
# To select text as expected, hold Option to disable it (iTerm2) | |
setw -g mouse on | |
# set vi mode for copy mode | |
setw -g mode-keys vi | |
# more settings to make copy-mode more vim-like | |
unbind [ | |
bind Escape copy-mode | |
unbind p | |
bind p pasteb | |
#bind -t vi-copy 'v' begin-selection | |
#bind -t vi-copy 'y' copy-selection | |
bind-key -Tcopy-mode-vi 'v' send -X begin-selection | |
bind-key -Tcopy-mode-vi 'y' send -X copy-selection | |
# Buffers to/ | |
bind '"' split-window -c '#{pane_current_path}' | |
bind '%' split-window -h -c '#{pane_current_path}' | |
bind c new-window -c '#{pane_current_path}' | |
# pane dividing line color | |
# set -g pane-border-fg white | |
# set -g pane-active-border-fg red | |
set -g window-active-style 'bg=colour234' | |
# powerline | |
# source "/Users/sunwei/.vim/bundle/powerline/powerline/bindings/tmux/powerline.conf" | |
# run-shell "powerline-daemon -q" | |
# statusbar | |
set -g status-position bottom | |
set -g status-bg colour234 | |
set -g status-fg colour14 | |
# set -g status-attr dim | |
set -g status-left '' | |
# set -g status-right '#[fg=colour233,bg=colour241,bold] %m/%d #[fg=colour233,bg=colour245,bold] %H:%M:%S ' | |
# set -g status-right ' #[fg=colour233,bg=colour245,bold] %H:%M:%S ' | |
set -g status-right '' | |
set -g status-right-length 50 | |
set -g status-left-length 20 | |
# setw -g window-status-current-fg colour81 | |
# setw -g window-status-current-bg colour123 | |
# setw -g window-status-current-attr bold | |
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' | |
# setw -g window-status-fg colour138 | |
# setw -g window-status-bg colour238 | |
# setw -g window-status-attr none | |
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | |
# setw -g window-status-bell-attr bold | |
# setw -g window-status-bell-fg colour255 | |
# setw -g window-status-bell-bg colour1 | |
# messages | |
# set -g message-attr bold | |
# set -g message-fg colour232 | |
# set -g message-bg colour166 | |
# panes | |
# set -g pane-border-bg colour235 | |
# set -g pane-border-fg colour238 | |
# set -g pane-active-border-bg colour236 | |
# set -g pane-active-border-fg colour51 | |
# modes | |
setw -g clock-mode-colour colour135 | |
# setw -g mode-attr bold | |
# setw -g mode-fg colour196 | |
# setw -g mode-bg colour238 | |
# clear | |
# bind C send-keys "clear" \; send-keys "Enter" | |
# tmux plugin | |
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'jbnicolai/tmux-fpp' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @plugin 'tmux-plugins/tmux-open' | |
# 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