User Tools

Site Tools


software:tmux

tmux

tmux is a terminal multiplexer. In human terms, it's a program that allows you to have many command lines inside a single terminal window, without the need for tabs built into the terminal emulator, as seen in programs like Tilix, gnome-terminal, etc. Though GNU screen precedes tmux, tmux offers a more modern codebase and simpler, more powerful configuration options.

This page is mostly to document tricks or "gotcha"s that tripped me up while using or configuring tmux.

The "-style" options

tmux v1.9 introduced a -style option, designed to supercede the -fg, -bg, and -attr options. The three options were removed in tmux v2.9. tmux v2.8 did not tell the user that these options were being removed, however, leading to user confusion and frustration after upgrading tmux.

tmux's manpage helpfully covers the -style option values, but doesn't clarify that the value should be quoted, like the -format option. Be sure to quote the value of the new -style options!

The manpage also does not feature an example of a multi-option -style argument. Here's a proper example:

# Let's migrate this old-style (tmux 2.8 and below) config...
message-fg green
message-bg default
message-attr bold
 
# To the new-style (tmux 1.9+) config. Don't forget your quotes!
message-style 'fg=green bg=terminal bold'
 
# Or, delimit with commas (and save two bytes, in case that matters)
message-style fg=green,bg=terminal,bold
software/tmux.txt · Last modified: 2021-08-12 00:50 by zlg