Skip to content

Instantly share code, notes, and snippets.

@Karasuni
Last active August 31, 2017 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Karasuni/78d455b4e2caacb283601da0a9ff7f03 to your computer and use it in GitHub Desktop.
Save Karasuni/78d455b4e2caacb283601da0a9ff7f03 to your computer and use it in GitHub Desktop.
Installing tmux locally from source
git clone https://github.com/libevent/libevent ~/software/libevent_source
cd ~/software/libevent_source
./autogen.sh &&
./configure --prefix=$HOME/software/libevent/ &&
make -j12 &&
make install -j12
git clone https://github.com/tmux/tmux.git ~/software/tmux_source
cd ~/software/tmux_source
sh autogen.sh &&
./configure --prefix=$HOME/software/tmux CFLAGS="-I$HOME/software/libevent/include" LDFLAGS="-L$HOME/software/libevent/lib" &&
make -j12 &&
make install -j12
echo -e "# Add tmux to path\nsetenv LD_LIBRARY_PATH ~/software/libevent/lib\nsetenv PATH ~/software/tmux/bin:\$PATH\n" >> ~/.cshrc.private
# https://github.com/tony/tmux-config
git clone --recursive https://github.com/tony/tmux-config.git ~/.tmux
ln -s ~/.tmux/.tmux.conf ~/.tmux.conf
cd ~/.tmux/vendor/
git clone https://github.com/thewtex/tmux-mem-cpu-load.git
cd tmux-mem-cpu-load &&
mkdir build &&
cd build &&
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/software/tmux/ &&
make -j12 &&
make install -j12
vi ~/.tmux/.tmux.conf
# Replace these lines:
set -g status-left '#[fg=green]#H #[fg=red]• #[fg=green,bright]#(uname -r | cut -c 1-6)#[default]'
set -g status-right '#[fg=green,bg=default,bright]#(~/software/tmux/bin/tmux-mem-cpu-load) #[fg=red,dim,bg=default]#(uptime | cut -f 4-5 -d " " | cut -f 1 -d ",") #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d'
# Execute while in tmux
CTRL+a :source-file ~/.tmux.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment