tmux-colortag
tmux-colortag copied to clipboard
A plug-and-play, minimal tmux plugin/theme that automatically colors the window tags.
Tmux ColorTag Plugin/Theme
.. raw:: html
<div align="center">
<img src="https://raw.githubusercontent.com/Determinant/tmux-colortag/master/demo.gif" width="90%">
</div>
Also works for powerline haters with default setting.
.. raw:: html
<div align="center">
<img src="https://raw.githubusercontent.com/Determinant/tmux-colortag/master/no-powerline-symbol.png" width="70%">
</div>
What's This?
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.
Features
- Automically color the window tabs by their name hash
- Manual control of coloring in tmux (also saved)
- Support Powerline symbols
TLDR; I just want it
-
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, thenIso everything should be ready.
Installation
-
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+Ito fetch the plugin and source it. -
Optional:
- To immediately play with the main feature, try
prefix(Ctrl+bby 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
Help
Press prefix, then C, type help and press enter.
Customization
-
To manually set the color of the active window tag, press
prefix+Cand: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-idxclears the preivous color of the indexclear-nameclears the preivous color of the nameclear-alluse auto-coloring for all window tags
.. raw:: html
<div align="center">
<img src="https://raw.githubusercontent.com/Determinant/tmux-colortag/master/demo-manual-coloring.gif" width="90%">
</div>
-
If you would like to use Powerline symbols like shown in the demo, add the following line to the top of your
.tmux.confto 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 topto your config file -
Other tweakable variables:
-
TMUX_COLORTAG_TAG_BOLD: specifyyesif you want bold tag text -
TMUX_COLORTAG_TAG_FOCUS_UNDERLINE: specifyyesif you want underlined text for the active tag -
TMUX_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 itnoor 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 separator -
TMUX_COLORTAG_SEP_RIGHT_PADDING: padding string after the separator -
Theme colors (value example: "colour123")
colortag_bg0colortag_bg1colortag_white0: font color of the active tagcolortag_white1: color of the active pane bordercolortag_lightgraycolortag_darkgray
-
Update to the Latest Version
- Hit
prefix+Uand choose this plugin.