Skip to content

Instantly share code, notes, and snippets.

@EddyBorja
Created August 31, 2021 21:05
Show Gist options
  • Save EddyBorja/4f0b1ce255cad627bf9c4c74b946edce to your computer and use it in GitHub Desktop.
Save EddyBorja/4f0b1ce255cad627bf9c4c74b946edce to your computer and use it in GitHub Desktop.
Tmux config
#set-option -g allow-rename off
#HJKL Arrow key movement between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#fast reload
bind r source-file ~/.tmux.conf
#modes
setw -g mode-fg colour1
setw -g mode-keys vi
#pane titles
set -g pane-border-status top
set -g pane-border-format "#[fg=colour2,bg=colour0]#[bg=colour0,fg=colour2] #{pane_index}:#[fg=colour21,bold]#{pane_current_command} #[fg=colour2,bg=colour0]"
set -g pane-border-style fg=colour19
set -g pane-active-border-style fg=2
#statusbar
set -g status-right-length 55
set -g status-bg colour18
set -g status-fg colour7
set -g @batt_remain_short true
set -g status-left '#[bg=colour19] #S #[fg=colour19,bg=colour18]#[fg=colour2] '
set -g status-right '#[fg=colour19,bg=colour18]#[bg=colour19] #{prefix_highlight}#[bg=colour19] '
#set -g status-attr dim
set -g @prefix_highlight_show_copy_mode on
set -g @prefix_highlight_copy_mode_attr 'fg=white,bg=yellow,bold' # default is 'fg=default,bg=yellow'
set -g @prefix_highlight_copy_prompt 'COPY'
set -g @prefix_highlight_prefix_prompt 'TMUX'
set -g @prefix_highlight_empty_prompt ' TMUX '
set -g @prefix_highlight_empty_attr 'fg=colour07,bg=colour19'
setw -g window-status-current-fg colour2
setw -g window-status-current-bg colour20
#setw -g window-status-current-attr bold
set -g window-status-separator ''
setw -g window-status-current-format '#[bg=colour2,fg=colour18]#[bg=colour2,fg=colour20] #I:#[fg=colour18,bold]#W #[fg=colour2,bg=colour18]'
setw -g window-status-format ' #[fg=colour2,bg=colour18] #I:#[fg=colour7]#W '
#copy paste
bind P paste-buffer
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
#plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-pain-control'
run -b '~/.tmux/plugins/tpm/tpm'
#disable confirm
bind-key x kill-pane
#clear window rename prompt by default
bind-key , command-prompt "rename-window '%%'"
#Rebind prefix
unbind C-b
set -g prefix C-b
bind C-b send-prefix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment