Skip to content

Instantly share code, notes, and snippets.

@cyxou
Last active August 29, 2015 14:02
Show Gist options
  • Save cyxou/06f9f6d33e2fcd685aa5 to your computer and use it in GitHub Desktop.
Save cyxou/06f9f6d33e2fcd685aa5 to your computer and use it in GitHub Desktop.
.tmux.conf
# enable vi mode
setw -g mode-keys vi
# set prefix to Ctrl-a
set -g prefix C-a
unbind C-b
# set index for windows and pane to start from 1
set -g base-index 1
set -g pane-base-index 1
# reload main .tmux.conf
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# send prefix to other apps
bind C-a send-prefix
# splitting panes
bind | split-window -h
bind - split-window -v
# select pane
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# resize pane
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set the foreground and background colors of the status bar
set -g status-fg white
set -g status-bg black
# CHANGING THE WINDOW LIST COLORS
# style the regular windows
setw -g window-status-fg cyan
setw -g window-status-bg default
setw -g window-status-attr dim
# style the active window
setw -g window-status-current-fg white
setw -g window-status-current-bg red
setw -g window-status-current-attr bright
# CHANGING PANE DIVIDER COLORS
#set -g pane-border-fg color
#set -g pane-border-bg color
#set -g pane-active-border-fg color
#set -g pane-active-border-bg color
#set -g pane-border-fg green
#set -g pane-border-bg black
#set -g pane-active-border-fg white
#set -g pane-active-border-bg yellow
# CUSTOMIZING THE COMMAND LINE
set -g message-fg white
set -g message-bg black
set -g message-attr bright
# CUSTOMIZING THE STATUS BAR
# set UTF-8 support in status bar
set -g status-utf8 on
set -g status-left-length 40
set -g status-left "#[fg=green]#S #[fg=yellow]#I-#[fg=cyan]#P"
set -g status-right "#[fg=cyan]%d %b %R"
# centering the window list
set -g status-justify centre
# activity notification in other windows
setw -g monitor-activity on
set -g visual-activity on
# WORKING WITH BUFFERS
# copy the current buffer to the system clipboard (requires xclip)
bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"
# paste text from the system clipboard into a tmux session:
bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment