Skip to content

Instantly share code, notes, and snippets.

@arbelt
Forked from bbqtd/macos-tmux-256color.md
Created June 27, 2020 16:07
Show Gist options
  • Save arbelt/002d688082081102efda4b5d6be73f3e to your computer and use it in GitHub Desktop.
Save arbelt/002d688082081102efda4b5d6be73f3e to your computer and use it in GitHub Desktop.
Installing tmux-256color for macOS

Installing tmux-256color for macOS

macOS has ncurses version 5.7 which doesn't ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color you can use screen-256color, place this command into your ~/.tmux.conf.

set-option -g default-terminal "screen-256color"

The Right Way

Firstly, we need to install latest version of ncurses by using brew.

$ brew install ncurses

After that, we're going to use infocmp that prints a terminfo description.

$ /usr/local/opt/ncurses/bin/infocmp tmux-256color > ~/tmux-256color.info

Finally, we need to compile the description to our system database and set default-terminal into ~/.tmux.conf.

$ sudo tic -xe tmux-256color tmux-256color.info
set-option -g default-terminal "tmux-256color"

RGB Colors

Also, don't forget to enable RGB. For instance, if you use Alacritty terminfo outside of tmux.

set-option -sa terminal-overrides ",alacritty:RGB"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment