path: root/tmux
diff options
authorTom Ryder <tom@sanctum.geek.nz>2012-04-28 01:59:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-04-28 01:59:19 +1200
commit238ad5c9a36c32c3405b878e868460851028b694 (patch)
tree62522020d79eceedb10a79538a1cd9cd40faef00 /tmux
parentThis either. (diff)
Completely refactored tmux conf
Diffstat (limited to 'tmux')
1 files changed, 42 insertions, 93 deletions
diff --git a/tmux/tmux.conf b/tmux/tmux.conf
index de16fcc4..bd221906 100644
--- a/tmux/tmux.conf
+++ b/tmux/tmux.conf
@@ -1,124 +1,73 @@
-# Set the prefix to C-A.
+# Prefix
unbind-key C-b
set-option -g prefix C-a
+bind-key a send-prefix
+bind-key C-a last-window
-# GNU Screen rebindings.
-unbind-key '"'
-unbind-key '|'
-unbind-key '-'
-unbind-key '/'
-unbind-key '\'
-unbind-key a
-unbind-key A
-unbind-key C-a
-unbind-key C-c
-unbind-key C-d
-unbind-key C-h
-unbind-key C-j
-unbind-key C-k
-unbind-key C-l
-unbind-key C-n
-unbind-key C-p
-unbind-key h
-unbind-key j
-unbind-key k
-unbind-key l
-unbind-key n
-unbind-key p
-unbind-key s
-unbind-key Tab
-bind-key '"' choose-window
-bind-key '|' split-window -h
-bind-key '_' split-window -v
+# Bindings
bind-key '/' confirm-before "kill-window"
bind-key '\' confirm-before "kill-server"
-bind-key a send-prefix
-bind-key A command-prompt "rename-window %%"
-bind-key C-a last-window
-bind-key C-c new-window
-bind-key C-d detach
-bind-key C-h select-pane -L
-bind-key C-j select-pane -D
-bind-key C-k select-pane -U
-bind-key C-l select-pane -R
-bind-key C-n next-window
-bind-key C-p previous-window
-bind-key c new-window
-bind-key n next-window
-bind-key p previous-window
-bind-key s choose-session
+bind-key '_' split-window -v
+bind-key '|' split-window -h
bind-key Tab select-pane -t :.+
-# Use vim-like copy and paste.
-bind-key -t vi-copy 'v' begin-selection
-bind-key -t vi-copy 'y' copy-selection
-# Use vim-like pane growing and shrinking.
-bind-key -r '<' resize-pane -L 5
-bind-key -r '>' resize-pane -R 5
+# Vim-like pane resize
bind-key -r '+' resize-pane -U 5
bind-key -r '-' resize-pane -D 5
+bind-key -r '<' resize-pane -L 5
+bind-key -r '>' resize-pane -R 5
-# Use vim-like pane moving.
+# Vim-like copy paste
+bind-key -t vi-copy 'v' begin-selection
+bind-key -t vi-copy 'y' copy-selection
+# Vim-like pane switching
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
-# Use vim-like pane swapping.
+# Vim-like pane swapping
bind-key J swap-pane -D
bind-key K swap-pane -U
-# Terminal settings.
-set-option -g default-terminal "screen-256color"
+# Activity
+set-window-option -g monitor-activity on
+set-window-option -g window-status-activity-attr none
+set-window-option -g window-status-activity-bg colour237
+set-window-option -g window-status-activity-fg colour248
-# Start window numbering at 1, not 0.
+# Indices
set-option -g base-index 1
-# Don't worry about escape sequences.
-set-option -s escape-time 0
+# Messages
+set-option -g message-bg colour18
+set-option -g message-fg colour231
-# Spiffy colours.
-set-option -g status-fg colour248
-set-option -g status-bg colour237
-set-option -g pane-border-fg colour237
-set-option -g pane-border-bg colour237
-set-option -g pane-active-border-fg colour237
+# Modes
+set-window-option -g mode-keys vi
+set-window-option -g mode-bg colour18
+set-window-option -g mode-fg colour231
+# Pane borders
set-option -g pane-active-border-bg colour237
+set-option -g pane-active-border-fg colour237
+set-option -g pane-border-bg colour237
+set-option -g pane-border-fg colour237
-# Set status bar text to the left and right.
+# Status bar
+set-option -g status-bg colour237
+set-option -g status-fg colour248
set-option -g status-left '[#S]'
set-option -g status-right '[#H] #(date +"%F %T")'
+set-window-option -g window-status-current-format "#[fg=colour231]#I:#W#F"
+set-window-option -g window-status-format "#[fg=colour16]#I:#W#F"
-# Fix freezing issue.
-set-option -g set-titles off
-# Sane scrolling.
+# Terminal
+set-option -g default-terminal "screen-256color"
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
+set-option -s escape-time 0
-# Set colours for messages and status lines.
-set-option -g message-fg colour231
-set-option -g message-bg colour18
-# Don't automatically rename windows.
+# Titles
set-window-option -g automatic-rename off
-# Use Vi mode.
-set-window-option -g mode-keys vi
-# Use two-space separators, and forget the status indicator.
-set-window-option -g window-status-format "#[fg=colour16]#I:#W#F"
-set-window-option -g window-status-current-format "#[fg=colour231]#I:#W#F"
-# Set colours for choosing dialogs.
-set-window-option -g mode-fg colour231
-set-window-option -g mode-bg colour18
-# Monitor window activity.
-set-window-option -g monitor-activity on
-# Use the same colours for windows with alerts.
-set-window-option -g window-status-activity-attr none
-set-window-option -g window-status-activity-fg colour248
-set-window-option -g window-status-activity-bg colour237