diff setup @ 501:072662ced8b8

Per-version tmux config.
author edogawaconan <me@myconan.net>
date Sun, 09 Mar 2014 14:11:47 +0900
parents 347e30690879
children e2b52663763b
line wrap: on
line diff
--- a/setup	Tue Feb 25 16:44:02 2014 +0900
+++ b/setup	Sun Mar 09 14:11:47 2014 +0900
@@ -121,6 +121,15 @@
   _echo "Ensured existence of ${@}"
 }
 
+_tmux() {
+  # Remove old tmux config.
+  _rc uninstall "tmux.conf" ".tmux.conf"
+  for tmux_conf in "${rcdir}/tmux-"*.conf; do
+    tmux_conf_file="${tmux_conf##*/}"
+    _rc "${1}" "${tmux_conf_file}" ".${tmux_conf_file}"
+  done
+}
+
 _help() {
   cat <<EOF
 Usage: ${0} [install|uninstall]
@@ -141,7 +150,7 @@
     _rc "${1}" "hgignore_global" ".hgignore_global"
     _touch "${HOME}/.hgignore_global.local"
     _rc "${1}" "inputrc" ".inputrc"
-    _rc "${1}" "tmux.conf" ".tmux.conf"
+    _tmux "${1}"
     _rc "${1}" "vim-solarized" ".vim/colors/solarized.vim"
     _rc "${1}" "vim-syntax-coffee" ".vim/syntax/coffee.vim"
     _rc "${1}" "vim-syntax-json" ".vim/syntax/json.vim"