Skip to content

Instantly share code, notes, and snippets.

Last active July 9, 2018 22:29
Show Gist options
  • Save bsod90/3c2b386589d0d599d91e1975a9cf9c21 to your computer and use it in GitHub Desktop.
Save bsod90/3c2b386589d0d599d91e1975a9cf9c21 to your computer and use it in GitHub Desktop.
Tmux config
# A status line theme generated by tmuxline.vim
if-shell "test -f ~/.tmuxline" "source ~/.tmuxline"
set -g default-terminal "screen-256color"
# Enables a true-color support in Tmux
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Moving between panes.
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Re-bind last window command
bind b last-window
# Pane resizing.
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
# Smart pane switching with awareness of vim splits
# See:
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?x?)(diff)?$"'
bind -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
# Vimlike copy mode.
unbind [
bind Escape copy-mode
unbind p
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-pipe-and-cancel 'reattach-to-user-namespace pbcopy'
# Enable vi keys.
setw -g mode-keys vi
# Setting the delay between prefix and command.
set -sg escape-time 1
# Set the base index for windows to 1 instead of 0.
# set -g base-index 1
# Set the base index for panes to 1 instead of 0.
# setw -g pane-base-index 1
# Enable activity alerts.
setw -g monitor-activity on
set -g visual-activity on
# Pane colors.
set -g pane-border-fg green
# Command / message line.
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# set -g @plugin 'seebi/tmux-colors-solarized'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# This tmux statusbar config was created by tmuxline.vim
# on Tue, 19 Apr 2016
set -g status-bg "colour234"
set -g message-command-fg "colour231"
set -g status-justify "left"
set -g status-left-length "100"
set -g status "on"
set -g pane-active-border-fg "colour254"
set -g message-bg "colour31"
set -g status-right-length "100"
set -g status-right-attr "none"
set -g message-fg "colour231"
set -g message-command-bg "colour31"
set -g status-attr "none"
set -g pane-border-fg "colour240"
set -g status-left-attr "none"
setw -g window-status-fg "colour250"
setw -g window-status-attr "none"
setw -g window-status-activity-bg "colour234"
setw -g window-status-activity-attr "none"
setw -g window-status-activity-fg "colour250"
setw -g window-status-separator ""
setw -g window-status-bg "colour234"
set -g status-left "#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=colour236,bg=colour234,nobold,nounderscore,noitalics]#[fg=colour247,bg=colour236] %Y-%m-%d  %H:%M #[fg=colour252,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour235,bg=colour252] #h "
setw -g window-status-format "#[fg=colour244,bg=colour234] #I #[fg=colour250,bg=colour234] #W "
setw -g window-status-current-format "#[fg=colour234,bg=colour31,nobold,nounderscore,noitalics]#[fg=colour117,bg=colour31] #I #[fg=colour231,bg=colour31,bold] #W #[fg=colour31,bg=colour234,nobold,nounderscore,noitalics]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment