Skip to content

Instantly share code, notes, and snippets.

@lee51
Last active March 9, 2017 00:11
Show Gist options
  • Save lee51/44858f8ae53fd2af7658dcb1885b03f3 to your computer and use it in GitHub Desktop.
Save lee51/44858f8ae53fd2af7658dcb1885b03f3 to your computer and use it in GitHub Desktop.
#!/bin/bash -eu
# Install dependencies (Red Hat)
ISSUE=$(head -1 /etc/issue | awk '{print $1}')
if [[ $(head -1 /etc/issue) =~ ^Ubuntu ]]; then
sudo apt-get install -y build-essential libevent-dev libncurses5-dev
else
sudo yum install -y gcc libevent-devel ncurses-devel
fi
TMPDIR=`mktemp -d`
cd $TMPDIR
wget https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
tar xzf tmux-2.3.tar.gz
cd tmux-2.3
./configure
make && sudo make install
cd ~ && rm -rf $TMPDIR
echo 'set -g mouse on
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
' > ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment