Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Regroup tmux config

This way I only have to run that terminal color test once, and it's much
tidier overall. Also removed a couple features I never use.
  • Loading branch information...
commit fa8fe5fad1f00d980e6c985cb70a85f7fdfd917c 1 parent 4795a01
@tejr authored
Showing with 39 additions and 52 deletions.
  1. +9 −8 install
  2. +13 −44 tmux/tmux.conf
  3. +17 −0 tmux/tmux.conf.256
View
17 install
@@ -6,14 +6,15 @@ git submodule --quiet update --init
cd "${OLDPWD}"
# Link in files, replacing whatever's already there.
-ln -fs ".dotfiles/bash/bashrc" "${HOME}/.bashrc"
-ln -fs ".dotfiles/bash/bash_profile" "${HOME}/.bash_profile"
-ln -fs ".dotfiles/bash/bash_logout" "${HOME}/.bash_logout"
-ln -fs ".dotfiles/git/gitconfig" "${HOME}/.gitconfig"
-ln -fs ".dotfiles/readline/inputrc" "${HOME}/.inputrc"
-ln -fs ".dotfiles/tmux/tmux.conf" "${HOME}/.tmux.conf"
-ln -fs ".dotfiles/vim/vimrc" "${HOME}/.vimrc"
-ln -fs ".dotfiles/vim/gvimrc" "${HOME}/.gvimrc"
+ln -fs ".dotfiles/bash/bashrc" "${HOME}/.bashrc"
+ln -fs ".dotfiles/bash/bash_profile" "${HOME}/.bash_profile"
+ln -fs ".dotfiles/bash/bash_logout" "${HOME}/.bash_logout"
+ln -fs ".dotfiles/git/gitconfig" "${HOME}/.gitconfig"
+ln -fs ".dotfiles/readline/inputrc" "${HOME}/.inputrc"
+ln -fs ".dotfiles/tmux/tmux.conf" "${HOME}/.tmux.conf"
+ln -fs ".dotfiles/tmux/tmux.conf.256" "${HOME}/.tmux.conf.256"
+ln -fs ".dotfiles/vim/vimrc" "${HOME}/.vimrc"
+ln -fs ".dotfiles/vim/gvimrc" "${HOME}/.gvimrc"
# Link in directories, removing whatever's already there first.
if [ -e "${HOME}/.vim" ]; then
View
57 tmux/tmux.conf
@@ -17,7 +17,7 @@ bind-key -r '-' resize-pane -D 5
bind-key -r '<' resize-pane -L 5
bind-key -r '>' resize-pane -R 5
-# Vim-like copy paste
+# Vim-like select/yank
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
@@ -27,56 +27,25 @@ bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
-# Vim-like pane swapping
-bind-key J swap-pane -D
-bind-key K swap-pane -U
-
# Activity
set-window-option -g monitor-activity on
set-window-option -g window-status-activity-attr none
-if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-activity-bg colour237'
-if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-activity-fg colour248'
-
-# Clipboard
-set-option -g set-clipboard off
-
-# History
-set-option -g history-limit 100000
-
-# Indices
-set-option -g base-index 1
-
-# Messages
-if-shell 'test `tput colors` -eq 256' 'set-option -g message-bg colour18'
-if-shell 'test `tput colors` -eq 256' 'set-option -g message-fg colour231'
-
-# Modes
-set-window-option -g mode-keys vi
-if-shell 'test `tput colors` -eq 256' 'set-window-option -g mode-bg colour18'
-if-shell 'test `tput colors` -eq 256' 'set-window-option -g mode-fg colour231'
-
-# Pane borders
-if-shell 'test `tput colors` -eq 256' 'set-option -g pane-active-border-bg colour237'
-if-shell 'test `tput colors` -eq 256' 'set-option -g pane-active-border-fg colour237'
-if-shell 'test `tput colors` -eq 256' 'set-option -g pane-border-bg colour237'
-if-shell 'test `tput colors` -eq 256' 'set-option -g pane-border-fg colour237'
-
-# Resize
-set-window-option -g aggressive-resize on
# Status bar
set-option -g status-left '[#S]'
set-option -g status-right '[#H] #(date +"%F %T")'
-if-shell 'test `tput colors` -eq 256' 'set-option -g status-bg colour237'
-if-shell 'test `tput colors` -eq 256' 'set-option -g status-fg colour248'
-if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-current-format "#[fg=colour231]#I:#W#F"'
-if-shell 'test `tput colors` -eq 256' 'set-window-option -g window-status-format "#[fg=colour16]#I:#W#F"'
-
-# Terminal
-CONTAINING_TERM=$TERM
-set-option -s escape-time 0
-if-shell 'test `tput colors` -eq 256' 'set-option -g default-terminal "screen-256color"'
-# Titles
+# Miscellaneous
+set-option -g base-index 1
+set-option -g escape-time 0
+set-option -g history-limit 100000
+set-option -g set-clipboard off
+set-window-option -g aggressive-resize on
set-window-option -g automatic-rename off
+set-window-option -g mode-keys vi
+
+# Terminal handling
+CONTAINING_TERM=$TERM
+if-shell 'test -e ~/.tmux.conf.256 && test `tput colors` -eq 256' \
+ 'source ~/.tmux.conf.256'
View
17 tmux/tmux.conf.256
@@ -0,0 +1,17 @@
+# 256 color terminals
+set-option -g default-terminal 'screen-256color'
+set-option -g message-bg colour18
+set-option -g message-fg colour231
+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-option -g status-bg colour237
+set-option -g status-fg colour248
+set-window-option -g mode-bg colour18
+set-window-option -g mode-fg colour231
+set-window-option -g window-status-activity-bg colour237
+set-window-option -g window-status-activity-fg colour248
+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"
+
Please sign in to comment.
Something went wrong with that request. Please try again.