Skip to content

Instantly share code, notes, and snippets.

@kukagg
Last active February 20, 2020 15:52
Show Gist options
  • Save kukagg/1b2dffa8045bd6fb7e71b9fe7caba97b to your computer and use it in GitHub Desktop.
Save kukagg/1b2dffa8045bd6fb7e71b9fe7caba97b to your computer and use it in GitHub Desktop.
###########################
# Configuration
###########################
# use 256 term for pretty colors
set -g terminal-overrides ',xterm-256color:Tc'
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',xterm*:sitm=\E[3m'
# use true colors
# set -g default-terminal "xterm-24bit"
# set -g terminal-overrides ',xterm-24bit:Tc'
# act like vim
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
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
# decrease command delay (increases vim responsiveness)
set -sg escape-time 1
# enable utf8 characters
setw -q -g utf8 on
# increase repeat time for repeatable commands
set -g repeat-time 1000
# start window index at 1
set -g base-index 1
# start pane index at 1
setw -g pane-base-index 1
# highlight window when it has new activity
setw -g monitor-activity off
set -g visual-activity off
# re-number and re-name windows dynamically
setw -g automatic-rename on
set -g renumber-windows on
###########################
# Key Bindings
###########################
# start with blank name when renaming windows
unbind ,
bind-key , command-prompt -p (rename-window) "rename-window '%%'"
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
###########################
# Status Bar
###########################
set -g status-bg 'colour235'
set -g status-fg colour248
set -g status-justify 'left'
set -g status-left-length '100'
set -g status 'on'
set -g status-right-length '100'
set -g message-fg 'colour222'
setw -g window-status-separator ''
set -g status-left '#[fg=colour232,bg=colour148] #S #[fg=colour148,bg=colour235,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour148,bg=colour235,nobold,nounderscore,noitalics]#[fg=colour232,bg=colour148] %I:%M %d/%m '
setw -g window-status-format '#[fg=colour244,bg=colour235,nobold,nounderscore,noitalics] #I.#W '
setw -g window-status-current-format '#[fg=colour148,bg=colour235] #I.#W '
###########################
# Colors
###########################
# # highlight current window
# set-window-option -g window-status-current-fg black
# set-window-option -g window-status-current-bg green
# # set color of active pane
# set -g pane-border-fg colour235
# set -g pane-border-bg black
# set -g pane-active-border-fg green
# set -g pane-active-border-bg black
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'xamut/tmux-spotify'
# restore neovim session
set -g @resurrect-strategy-nvim 'session'
# automatic tmux start when computer is started, based on systemd
set -g @continuum-boot 'on'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# run-shell ~/.tmux/resurrect/last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment