Skip to content

Instantly share code, notes, and snippets.

@eloyvega
Last active February 28, 2017 18:41
Show Gist options
  • Save eloyvega/24e7eb02f43e03e5a6c2b338520d3d0b to your computer and use it in GitHub Desktop.
Save eloyvega/24e7eb02f43e03e5a6c2b338520d3d0b to your computer and use it in GitHub Desktop.
tmux config
# Avoid renaming windows with commands
set-option -g allow-rename off
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Faster scrolling
set -g @scroll-speed-num-lines-per-scroll 5
# Setup 'v' to begin selection as in Vim
bind-key -t vi-copy v begin-selection
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
# Update default binding of `Enter` to also use copy-pipe
unbind -t vi-copy Enter
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# Use + and - to create window and restore to pane
unbind +
bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom
unbind -
bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom
# Tmux resurrect
run-shell ~/.tmux/resurrect/resurrect.tmux
# Move with hjkl between panes
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
#-------------------------------------------------------#
#Pane colours
#-------------------------------------------------------#
# set inactive/active window styles
set -g window-style 'bg=default,fg=default'
set -g window-active-style 'fg=default,bg=default'
#pane border
# set -g pane-border-bg default
# set -g pane-border-fg default
# set -g pane-active-border-bg default
# set -g pane-active-border-fg default
#-------------------------------------------------------#
#### COLOUR (Solarized dark)
# default statusbar colors
set-option -g status-bg black #base02
set-option -g status-fg yellow #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg brightblue #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg brightred #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg black #base02
set-option -g pane-active-border-fg brightgreen #base01
# message text
set-option -g message-bg black #base02
set-option -g message-fg brightred #orange
# pane number display
set-option -g display-panes-active-colour blue #blue
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
# bell
set-window-option -g window-status-bell-style fg=black,bg=red #base02, red
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment