aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2020-05-22 17:30:55 -0400
committerDeterminant <tederminant@gmail.com>2020-05-22 17:30:55 -0400
commit21430f45aa2d26704c479141b48b6a5571f0c5ac (patch)
treefc9dae8118b647848c5a26f675c5842e85c39cec
parentfd0466fc9df0b5a143d52d2cc5ab850e0b19bcac (diff)
allow customizing the theme colors
-rw-r--r--README.rst32
-rwxr-xr-xtmux-colortag.tmux12
2 files changed, 25 insertions, 19 deletions
diff --git a/README.rst b/README.rst
index f738fc0..4e42677 100644
--- a/README.rst
+++ b/README.rst
@@ -88,24 +88,30 @@ Customization
- To change the prompt key (``prefix`` + ``C``), specify your key in ``TMUX_COLORTAG_KEY``.
-- If you don't like the existing powerline symbols, feel free to change them by
- specifying the following environment variables to override the default:
+- 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 file
+
+- Other tweakable variables:
- ``TMUX_ARROW_SYMBOL_L1``
- ``TMUX_ARROW_SYMBOL_L2``
- ``TMUX_ARROW_SYMBOL_R1``
- ``TMUX_ARROW_SYMBOL_R2``
-
-- 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 file
-
-- For the best experience, this plugin assumes a short status update
- interval. To change it back, specify ``TMUX_COLORTAG_SET_INTERVAL=no`` or
- directly override the setting in your tmux config file.
-
-- If you only want to color the tags (without changing other styles
- such as borders), specify ``TMUX_COLORTAG_TAG_ONLY=yes``.
-
-- ``TMUX_COLORTAG_IDX_SEP`` controls the separator between the window index and name.
+ - ``TMUX_COLORTAG_SET_INTERVAL``: for the best experience, this plugin
+ assumes a short status update interval. To change it back, make it ``no`` 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 it ``yes``.
+
+ - ``TMUX_COLORTAG_IDX_SEP``: controls the separator between the window index and name.
+ - Theme colors (value example: "colour123")
+
+ - ``colortag_bg0``
+ - ``colortag_bg1``
+ - ``colortag_white0``: font color of the active tag
+ - ``colortag_white1``: color of the active pane border
+ - ``colortag_lightgray``
+ - ``colortag_darkgray``
Update to the Latest Version
============================
diff --git a/tmux-colortag.tmux b/tmux-colortag.tmux
index 0890ee8..747c621 100755
--- a/tmux-colortag.tmux
+++ b/tmux-colortag.tmux
@@ -11,12 +11,12 @@ if [[ "$TMUX_COLORTAG_SET_INTERVAL" == yes ]]; then
tmux set -g status-interval 2
fi
-bg0=colour235
-bg1=colour237
-white0=colour255
-white1=colour250
-lightgray=colour248
-darkgray=colour241
+bg0=${colortag_bg0:-colour235}
+bg1=${colortag_bg1:-colour237}
+white0=${colortag_white0:-colour255}
+white1=${colortag_white1:-colour250}
+lightgray=${colortag_lightgray:-colour248}
+darkgray=${colortag_darkgray:-colour241}
if [[ "$TMUX_COLORTAG_TAG_ONLY" != yes ]]; then
tmux set -g message-style fg=$bg1,bg=$lightgray