Skip to content

Instantly share code, notes, and snippets.

@commonquail
Last active May 8, 2022 01:00
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save commonquail/643f64edbe58d5702844 to your computer and use it in GitHub Desktop.
Save commonquail/643f64edbe58d5702844 to your computer and use it in GitHub Desktop.
Build tmux with 24bit color and ncursesw
#!/bin/bash
set -o errexit
ncursesw_dir=/usr/include/ncursesw
[[ -d "$ncursesw_dir" ]] ||
{
echo "fatal: ncursesw not found at ${ncursesw_dir}" >&2
exit 1
}
# These build but do not seem to produce 24bit colour.
# Use the original patch instead.
#git clone https://github.com/sunaku/tmux.git
#cd tmux
#git checkout origin/24bit-color
wget -O /tmp/tmux-24.diff \
https://gist.githubusercontent.com/choppsv1/dd00858d4f7f356ce2cf/raw/794b25ba7b6cb73a95bc19aef35a86fed4b4625e/tmux-24.diff
git clone https://github.com/tmux/tmux.git
cd tmux
git checkout 2.0
git apply /tmp/tmux-24.diff
sh autogen.sh
./configure \
CPPFLAGS="-I/usr/include -I${ncursesw_dir}" \
CFLAGS="-I/usr/include -I${ncursesw_dir}" \
LDFLAGS="-L/usr/lib -L${ncursesw_dir} -L/usr/include"
CPPFLAGS="-I/usr/include -I${ncursesw_dir}" \
LDFLAGS="-static -L/usr/include -L${ncursesw_dir} -L/usr/lib" \
make
@ik9999
Copy link

ik9999 commented Dec 29, 2015

Thank you for this script! Very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment