Skip to content

Instantly share code, notes, and snippets.

@FreddieLindsey
Last active January 16, 2016 07:23
Show Gist options
  • Save FreddieLindsey/937578ef9e16d20b8cfd to your computer and use it in GitHub Desktop.
Save FreddieLindsey/937578ef9e16d20b8cfd to your computer and use it in GitHub Desktop.
My current tmux config
# Remap prefix to Meta-a
set -g prefix M-a
bind M-a send-prefix
# Reload config without killing server
bind R source-file ~/.tmux.conf \; display-message " Config reloaded..."
# Clear history of pane
bind -n C-d send-keys "clear"\; send-keys "Enter"\; clear-history
# Set status bar colours and commands
set -g status-bg "#FFFFFF"
set -g status-fg white
set -g status-left '#[fg=#FFFFFF]#[bg=#3B74F6]#(echo " [")#S#(echo "] ")'
set -g status-left-length 30
set -g status-right '#[fg=#FFFFFF]#[bg=#3B74F6]#(echo " ")%d/%m/%Y %H:%M:%S#(echo " ")'
set -g status-justify centre
# Set to monitor activity
setw -g monitor-activity on
set -g visual-activity on
# Set commands to split the window
unbind %
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
# Set commands for new panes
unbind c
bind c new-window -c "#{pane_current_path}"
# Set active window colours
setw -g window-status-current-bg "#DBC28E"
setw -g window-status-current-fg white
setw -g window-status-current-attr bright
# Set non-active windows colours
setw -g window-status-fg white
setw -g window-status-bg "#3F3F3F"
setw -g window-status-attr dim
# Set escape time
set -s escape-time 1
# Set indices to start at 1
set -g base-index 1
setw -g pane-base-index 1
# Select panes using the home row
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Resize panes using the home row
bind -n C-h resize-pane -L
bind -n C-j resize-pane -D
bind -n C-k resize-pane -U
bind -n C-l resize-pane -R
# Cycle through windows
bind / select-window -t :+
# Set mouse-mode off
setw -g mode-mouse off
# Ensure tmux is using 256 colours
set -g default-terminal "xterm-256color"
# Set xterm keys to be sent
set -g xterm-keys on
# Set pane borders
set -g pane-border-fg white
set -g pane-border-bg black
set -g pane-active-border-fg green
set -g pane-active-border-bg default
# Set colours of message bar
set -g message-fg white
set -g message-bg "#6B6B6B"
set -g message-attr bright
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment