Skip to content

Instantly share code, notes, and snippets.

@ricardochimal
Created February 21, 2019 23:25
Show Gist options
  • Save ricardochimal/17e91d4c40b000c1d0ed77f7d1976a3a to your computer and use it in GitHub Desktop.
Save ricardochimal/17e91d4c40b000c1d0ed77f7d1976a3a to your computer and use it in GitHub Desktop.
.tmux.conf
# Base Settings
## C-z as prefix
# set-option -g prefix C-z
# unbind-key C-b
# bind-key C-z send-prefix
## Set a really long buffer
set -g history-limit 8096
## start window indexing at one (default = 0)
set -g base-index 1
## xterm-style function key sequences
# setw -g xterm-keys off
## vi-style controls for copy-mode
# setw -g mode-keys vi
## tmux will update these env variables when creating new sessions
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY GPG_AGENT_INFO DBUS_SESSION_BUS_ADDRESS"
# Extra Commands
## copy-mode: v begins selection y finishes it
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
## add a reload key
bind r source-file ~/.tmux.conf
## Split Pane commands
unbind %
bind | split-window -h
bind - split-window -v
# Resize panes
bind -r j resize-pane -D 5
bind -r k resize-pane -U 5
bind -r l resize-pane -L 5
bind -r h resize-pane -R 5
# Theme
# In order to see all the colours available use the following bash loop
# for i in {0..255} ; do printf "\x1b[38;5;${i}mcolour${i}\n"; done
## Set status bar
set -g status-bg colour234
set -g status-fg colour253
set -g status-left-bg default
set -g status-left-fg colour74
## Highlight active window
setw -g window-status-current-bg colour52
## Highlight active pane
set -g pane-border-fg colour235
set -g pane-border-fg colour238
set -g pane-active-border-fg colour87
set -g pane-active-border-fg colour57
set -g pane-active-border-fg colour129
set -g pane-active-border-fg colour63
## Automatically set window title
setw -g automatic-rename
## support 256color terminal
set -g default-terminal "screen-256color"
# set -g default-terminal "screen"
# set -g terminal-overrides 'xterm*:smcup <at> :rmcup <at> :colors=256'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment