Also works for powerline haters with default setting.
This is a very succinct plugin that colors the window tags according to their names. The color can even automatically change when your shell runs different programs! It also serves as a minimal theme that is friendly to any people who just want something simple and works.
- Automically color the window tabs by their name hash
- Manual control of coloring in tmux (also saved)
- Support Powerline symbols
Execute the following line in your shell:
curl -sS https://raw.githubusercontent.com/Determinant/tmux-colortag/master/bootstrap.sh | bash
Run
tmux
, and then hitCtrl+b
, release, thenI
so everything should be ready.
Make sure you have tmux plugin manager installed: https://github.com/tmux-plugins/tpm
Add it to the list of TPM plugins in
.tmux.conf
:set -g @plugin 'Determinant/tmux-colortag'
Hit
prefix
+I
to fetch the plugin and source it.Optional:
- To immediately play with the main feature, try
prefix
(Ctrl+b
by default) +,
and change the window name. - NOTE: tmux won't change the window name automatically once you set it manually. To test the auto-changing color, just run any command in your new window.
- To immediately play with the main feature, try
Press prefix
, then C
, type help
and press enter.
- To manually set the color of the active window tag, press
prefix
+C
and:color-idx <0-255 color code>
to manually set the color for the window indexcolor-name <0-255 color code>
to manually set the color for the nameclear-idx
clears the preivous color of the indexclear-name
clears the preivous color of the nameclear-all
use auto-coloring for all window tags
If you would like to use Powerline symbols like shown in the demo, add the following line to the top of your
.tmux.conf
to enable them:TMUX_COLORTAG_USE_POWERLINE=yes # uncomment the following line to have rounded arrows # TMUX_COLORTAG_ROUNDED_POWERLINE=yes
To change the prompt key (
prefix
+C
), specify your key inTMUX_COLORTAG_KEY
.TIP: If you love the status bar on the top (instead of at the bottom by default in tmux), add
set-option -g status-position top
to your config fileOther tweakable variables:
TMUX_COLORTAG_TAG_BOLD
: specifyyes
if you want bold tag textTMUX_COLORTAG_TAG_FOCUS_UNDERLINE
: specifyyes
if you want underlined text for the active tagTMUX_COLORTAG_TAG_TEXT_COLOR
TMUX_COLORTAG_TAG_FOCUS_TEXT_COLOR
TMUX_ARROW_SYMBOL_L1
TMUX_ARROW_SYMBOL_L2
TMUX_ARROW_SYMBOL_R1
TMUX_ARROW_SYMBOL_R2
TMUX_COLORTAG_SET_INTERVAL
: for the best experience, this plugin assumes a short status update interval. To change it back, make itno
or directly override the setting in your tmux config file.TMUX_COLORTAG_TAG_ONLY
: if you only want to color the tags (without changing other styles such as borders), make ityes
.TMUX_COLORTAG_IDX_SEP
: controls the separator between the window index and name.TMUX_COLORTAG_SEP_LEFT_PADDING
: padding string before the separatorTMUX_COLORTAG_SEP_RIGHT_PADDING
: padding string after the separator- Theme colors (value example: "colour123")
colortag_bg0
colortag_bg1
colortag_white0
: font color of the active tagcolortag_white1
: color of the active pane bordercolortag_lightgray
colortag_darkgray
- Hit
prefix
+U
and choose this plugin.