Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tmux.conf
set-option -g default-command "reattach-to-user-namespace -l zsh"
# Use vim keybindings in copy mode
setw -g mode-keys vi
# 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"
#bind y run-shell "reattach-to-user-namespace -l zsh -c 'tmux show-buffer | pbcopy'"
# In copy-mode, y will copy that text to the tmux buffer as well as the OS clipboard
#bind -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy"
unbind C-b
set -g prefix C-a
bind-key a send-prefix
# Quick toggle to between last two active windows
bind-key space last-window
# Add a binding to toggle status line
bind v set status
# Display tmux session name in the tab title
set-option -g set-titles on
set-option -g set-titles-string "#S:#{pane_current_command}"
# Eliminate ESC key delay
set -sg escape-time 0
# Activity monitoring
# setw -g monitor-activity on
# set -g visual-activity off
# Disable status line by default
# set -g status off
# Enable mouse pane switching
set-option -g mouse-select-pane on
# Toggle mouse scrolling
setw -g mode-mouse on
# Set up proper terminal with 256 colors
set -g default-terminal "xterm-256color"
# Highlight active window
set-window-option -g window-status-current-bg yellow
unbind [
bind Escape copy-mode
# unbind p
# bind p paste-buffer
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Make semicolon behave like colon
bind-key \; command-prompt
# Clear pane
bind K send-keys -R \; clear-history
#### COLOURS
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-left-bg colour237 #base02
set-option -g status-left-fg colour0 #base02
set-option -g status-fg black #yellow
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg colour235
#set-window-option -g window-status-attr dim
# active window title colors
set-window-option -g window-status-current-fg colour110 #orange
set-window-option -g window-status-current-bg colour237
#set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour110 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment