Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
My .tmux.conf
# # act like GNU screen
unbind C-b
set -g prefix C-a
# Allow C-A a to send C-A to application
bind C-a send-prefix
# start window index of 1
set -g base-index 1
# UTF-8 charater support in the status bar
set-option -g status-utf8 on
# Lowers the delay time between the prefix key and other keys - fixes pausing in vim
set -sg escape-time 1
# Uncomment these if you'd like to use the mouse
set-window-option -g mode-mouse on
set-option -g mouse-select-pane on
set-option -g mouse-resize-pane on
set-option -g mouse-select-window on
# When in Copy mode, act like vim
set-window-option -g mode-keys vi
### Keybidings
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind-key -r C-h select-window -t :-
bind-key -r C-l select-window -t :+
bind-key C-a last-window
bind-key e select-window -t editor
bind-key v select-window -t vim
bind-key | split-window -h
bind-key \ split-window -h
bind-key - split-window -v
bind-key _ split-window -v -p 25 # Makes a horizontal 'testing' pane
bind-key / split-window -h -p 33 # Makes a vertical 'testing' pane
bind-key T join-pane -ht vim -p 33 # Makes the current pane merge horizontally with a 'vim' window at 33%
bind-key V join-pane -ht vim -p 33 # Makes the current pane merge horizontally with a 'vim' window at 33%
bind-key b break-pane -d
bind-key x kill-pane
bind-key X kill-window
bind-key q confirm-before kill-session
bind-key Q confirm-before kill-server
bind-key , previous-window # <
bind-key . next-window # >
bind-key -r < swap-window -t :-
bind-key -r > swap-window -t :+
bind-key n command-prompt 'rename-window %%'
bind-key N command-prompt 'rename-session %%'
bind-key Escape copy-mode -u
bind-key Up copy-mode -u
bind-key r source-file ~/.tmux.conf; display-message " ✱ ~/.tmux.conf is reloaded"
bind-key R refresh-client
bind-key a send-key C-a
bind-key S set-option status
bind-key J resize-pane -D 5
bind-key K resize-pane -U 5
bind-key H resize-pane -L 5
bind-key L resize-pane -R 5
bind-key M-j resize-pane -D
bind-key M-k resize-pane -U
bind-key M-h resize-pane -L
bind-key M-l resize-pane -R
# Copy mode keybindings
unbind p
bind p paste-buffer
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# # look good
set -g default-terminal "screen-256color"
#set TERM=screen-256color
set -g history-limit 5000
# # Set window notifications
setw -g monitor-activity on
set -g visual-activity on
# set status bar
# ---------------------------------------------------------
## default statusbar colors
set-option -g status-utf8 on
set-option -g status-bg colour11
set-option -g status-fg colour8
## highlight active window
set-window-option -g window-status-current-bg colour166
set-window-option -g window-status-current-fg colour15
set-window-option -g window-status-current-attr bold
set-window-option -g window-status-current-format ' #I #W '
#set-option -g status-left '⣿'
#set-option -g status-right '⡇ #[bold]❐ #S:#I#[default] ⡇ #[bold]#(whoami) ● #H#[default] '
#set-option -g status-right '⡇ ❐ #S ⡇ ❖ #(rvm tools identifier) ⡇ #(whoami) ● #H '
set-option -g status-left '⣿ #[bold]#[fg=red]❖ #(rvm tools identifier)#[fg=colour8] ❐ #S#[default] ⡇'
set-option -g status-right '#[bold]#(whoami) ● #H#[default] %Y-%m-%d %H:%M ⡇ #(~/battery Discharging)'
set-option -g status-right-length 60
set-option -g status-left-length 60
## set window notifications
set-option -g visual-activity on
set-option -g visual-content on
set-window-option -g monitor-activity on
set-window-option -g automatic-rename off
## tmux window titling for X
set-option -g set-titles on
set-option -g set-titles-string '[#I] #W'
set-window-option -g automatic-rename on
set-window-option -g window-status-format ' #I #W '
set-window-option -g window-status-attr bold
# starts windows at 1 not 0
set-option -g base-index 1
# set-window-option -g monitor-activity off
# set-window-option -g monitor-content off
# set-option -g status-keys vi
# set-option -g history-limit 4096
## pane border and colors
set-option -g pane-active-border-fg yellow
set-option -g pane-border-fg white
# Time messages remain in the status bar. Lower this number
# if this is too distracting.
set-option -g display-time 3000
# ---------------------------------------------------------
# Sane scrolling (not sure what it does...)
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment