diff --git a/env.sh b/env.sh
index 1d7d44c..936fabe 100755
--- a/env.sh
+++ b/env.sh
@@ -26,8 +26,8 @@ in-china () {
return 0
}
-ln-dir () {
- [ "$#" -ne 2 ] && echo "ln-dir
"
+lnsf () {
+ [ "$#" -ne 2 ] && echo "lnsf "
[ ! -L "$2" ] && rm -rf $2
SYM_DIR=$(dirname $2)
[ -n "$SYM_DIR" ] && mkdir -p $SYM_DIR
diff --git a/fish/install.sh b/fish/install.sh
index 792e90a..ae0795f 100755
--- a/fish/install.sh
+++ b/fish/install.sh
@@ -23,4 +23,4 @@ if [ "$DEFAULT_SHELL" != "$FISH_SHELL" ]; then
fi
# symlink config
-ln-dir $DIR/config ~/.config/fish
+lnsf $DIR/config ~/.config/fish
diff --git a/nvim/install.sh b/nvim/install.sh
index 8cf6fd9..d57bcf8 100755
--- a/nvim/install.sh
+++ b/nvim/install.sh
@@ -19,4 +19,4 @@ case "$PM" in
esac
# symlink configuration
-ln-dir $DIR/config ~/.config/nvim
+lnsf $DIR/config ~/.config/nvim
diff --git a/config/tmux/tmux2.8.conf b/tmux/config/tmux2.8.conf
similarity index 100%
rename from config/tmux/tmux2.8.conf
rename to tmux/config/tmux2.8.conf
diff --git a/config/tmux/tmux2.9.conf b/tmux/config/tmux2.9.conf
similarity index 100%
rename from config/tmux/tmux2.9.conf
rename to tmux/config/tmux2.9.conf
diff --git a/tmux/install.sh b/tmux/install.sh
old mode 100644
new mode 100755
index a9bf588..b479432
--- a/tmux/install.sh
+++ b/tmux/install.sh
@@ -1 +1,34 @@
#!/bin/bash
+
+DIR=$(readlink -f $(dirname $0))
+. $DIR/../env.sh
+
+TMUX_VER=3.1b
+
+# install ranger
+case "$PM" in
+ apt)
+ sudo apt install libevent-dev libncurses5-dev bison autoconf -y
+ TMUX_SRC_URL=https://github.com/tmux/tmux/releases/download/$TMUX_VER/tmux-$TMUX_VER.tar.gz
+ if in-china; then
+ TMUX_SRC_URL=https://gitee.com/klesh/tmux/repository/archive/$TMUX_VER?format=tar.gz
+ fi
+ [ ! -f /tmp/tmux.tar.gz ] && curl -L $TMUX_SRC_URL -o /tmp/tmux.tar.gz
+ rm -rf /tmp/tmux
+ mkdir -p /tmp/tmux
+ tar zxvf /tmp/tmux.tar.gz -C /tmp/tmux --strip 1
+ pushd /tmp/tmux
+ [ -f autogen.sh ] && sh autogen.sh
+ ./configure && make
+ sudo make install
+ popd
+ rm -rf /tmp/tmux*
+ ;;
+ pacman)
+ sudo pacman -S tmux
+ ;;
+esac
+
+# symlink configuration
+lnsf $DIR/tmux.conf ~/.tmux.conf
+lnsf $DIR/config ~/.config/tmux
diff --git a/ubuntu/install-tmux.sh b/ubuntu/install-tmux.sh
deleted file mode 100755
index f62c8f3..0000000
--- a/ubuntu/install-tmux.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-
-set -e
-
-sudo apt install libevent-dev libncurses5-dev bison -y
-
-TMUX_VER=3.1b
-#curl -L https://github.com/tmux/tmux/releases/download/$TMUX_VER/tmux-$TMUX_VER.tar.gz -o /tmp/tmux.tar.gz
-[ ! -f /tmp/tmux.tar.gz ] && curl -L https://gitee.com/klesh/tmux/repository/archive/$TMUX_VER?format=tar.gz -o /tmp/tmux.tar.gz
-rm -rf /tmp/tmux
-mkdir -p /tmp/tmux
-tar zxvf /tmp/tmux.tar.gz -C /tmp/tmux --strip 1
-pushd /tmp/tmux
-[ -f autogen.sh ] && sh autogen.sh
-./configure && make
-sudo make install
-popd
-rm -rf /tmp/tmux*