Skip to content

Instantly share code, notes, and snippets.

@morika-t
Forked from zlalanne/tmux_cygwin.md
Created November 24, 2017 02:22
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 morika-t/303f6f5051a9131081913f5d641197f9 to your computer and use it in GitHub Desktop.
Save morika-t/303f6f5051a9131081913f5d641197f9 to your computer and use it in GitHub Desktop.
tmux on Cygwin

Steps to install tmux in Cygwin

Install required Cygwin packages

  1. run Cygwin setup.exe
  2. install these packages that are not installed by default: automake, gcc, git and pkg-config

Install libevent

  1. browse http://libevent.org
  2. download libevent-2.0.21-stable.tar.gz
  3. open a cygwin terminal
  4. cd to directory containing downloaded file
  5. tar zxf libevent-2.0.21-stable.tar.gz
  6. cd libevent-2.0.21-stable
  7. ./configure --prefix=/usr
  8. make && make install

Install ncurses

  1. browse http://ftp.gnu.org/gnu/ncurses
  2. download ncurses-5.9.tar.gz
  3. open a cygwin terminal
  4. cd to directory containing downloaded file
  5. tar zxf ncurses-5.9.tar.gz
  6. cd ncurses-5.9
  7. ./configure --prefix=/usr
  8. make && make install

Install tmux

  1. open a cygwin terminal
  2. git clone http://git.code.sf.net/p/tmux/tmux-code tmux-tmux-code
  3. cd tmux-tmux-code
  4. ./autogen.sh (will see many warnings; if it complains about \r not found, convert autogen.sh to use Unix line endings with mv autogen.sh temp.sh; dos2unix -o autogen.sh temp.sh)
  5. CFLAGS="-I/usr/include/ncurses" ./configure --prefix=/usr
  6. make && make install

Configure Cygwin and tmux

  1. to use the Solarized color scheme, see here.
  2. to manually adjust colors, fonts, cursor shape, and more right-click the Cygwin title bar and select "Options...".
  3. create a .tmux.conf file include at least this line so the mouse and arrow keys can be used to switch panes:
  4. set -sg escape-time 250
  5. for more information about tmux configuration, see here.

Run tmux

  1. open a cygwin terminal using mintty (the shortcut that opens the terminal should run C:\cygwin\bin\mintty.exe)
  2. tmux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment