Skip to content

Instantly share code, notes, and snippets.

@eltonlaw
Last active February 13, 2019 23:05
Show Gist options
  • Save eltonlaw/0d054ae3b49ef0239a571ed1a8961f3c to your computer and use it in GitHub Desktop.
Save eltonlaw/0d054ae3b49ef0239a571ed1a8961f3c to your computer and use it in GitHub Desktop.
# Unbind prefix from Ctrl-b to Ctrl-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Moving between panes using 'hjkl'
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes using 'HJKL'
bind K resize-pane -U 15
bind J resize-pane -D 15
bind H resize-pane -L 25
bind L resize-pane -R 25
# To copy and pate between vim instances
if-shell "uname | grep -q Darwin" "set-option -g default-command 'reattach-to-user-namespace -l bash'"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Split panes
bind \ split-window -h -c '#{pane_current_path}' # Split panes horizontal
bind - split-window -v -c '#{pane_current_path}' # Split panes vertically
######################
### DESIGN CHANGES ###
######################
#+----------------+
#+ Plugin Support +
#+----------------+
#+--- tmux-prefix-highlight ---+
set -g @prefix_highlight_output_prefix "#[fg=brightcyan]#[bg=black]#[nobold]#[noitalics]#[nounderscore]#[bg=brightcyan]#[fg=black]"
set -g @prefix_highlight_output_suffix ""
set -g @prefix_highlight_copy_mode_attr "fg=brightcyan,bg=black,bold"
#+--------+
#+ Status +
#+--------+
#+--- Bars ---+
set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]"
set -g status-right "#(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)"
# set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H "
#+--- Windows ---+
set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]"
set -g window-status-separator ""
set -g status-bg black
set -g status-fg white
# set -g pane-border-style fg=white
# set -g pane-active-border-style fg=colour45
set -g pane-border-style fg=black
set -g pane-active-border-style fg=white
tmux_conf_theme_clock_style='24'
# To allow scrolling
set -g mouse on
source-file "$HOME/.tmux-gitbar/tmux-gitbar.tmux"
# Must be last line
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment