Skip to content

Instantly share code, notes, and snippets.

@tnightingale
Created May 11, 2018 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnightingale/39eabf0bc6ffb80f9e76afbf08c1c60e to your computer and use it in GitHub Desktop.
Save tnightingale/39eabf0bc6ffb80f9e76afbf08c1c60e to your computer and use it in GitHub Desktop.
# act like vim
setw -g mode-keys vi
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key -r J resize-pane -D 5
bind-key -r K resize-pane -U 5
bind-key -r H resize-pane -L 5
bind-key -r L resize-pane -R 5
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
# act like GNU screen
unbind C-b
set -g prefix C-a
# look good
set -g default-terminal "screen-256color"
# Window id's start at 1.
set -g base-index 1
# Set status bar
set -g status-bg black
set -g status-fg white
set -g status-left-length 50
set -g status-left '#[fg=brightmagenta]#H::#S'
set -g status-interval 3
# Highlight active window
set-window-option -g window-status-current-bg red
# System status
set-option -g status-right '#[fg=yellow]#(uptime | cut -d "," -f 2-)'
# Enable draggable pane borders
set-option -g mouse on
# Increase scroll buffer
set-option -g history-limit 10000
# Fix process context with homebrew's reattach-to-user-namespace
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Enable vim-style select, 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
#### 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
# Set short escape time for nvim (https://github.com/neovim/neovim/wiki/Troubleshooting#pressing-esc-when-running-nvim-in-tmux-or-gnu-screen-inserts-characters)
set -g escape-time 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment