diff --git a/README.md b/README.md index 12abb25..bdf59ae 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ If you have any bug reports, please feel free to submit a PR, or a bug report. ## Installing +### Git + Clone this repository to your `$HOME/.tmux` directory, and add the following line to your `~/.tmux.conf`: ```bash @@ -29,6 +31,22 @@ set -g status-right "#(/bin/bash $HOME/.tmux/kube.tmux 250 red cyan)" 250 is the color selection for the default foreground, red for the context, and cyan for the namespace. +### TPM + +It can be installed using the [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) + +```bash +set -g status-right "#(/bin/bash ~/.tmux/plugins/kube-tmux/kube.tmux 250 red cyan)" + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'jonmosco/kube-tmux' + +run '~/.tmux/plugins/tpm/tpm' +``` + +250 is the color selection for the default foreground, red for the context, +and cyan for the namespace. + ## Requirements * tmux diff --git a/kube.tmux b/kube.tmux index a88055a..6520141 100644 --- a/kube.tmux +++ b/kube.tmux @@ -20,7 +20,7 @@ # Default values for the plugin KUBE_TMUX_BINARY="${KUBE_TMUX_BINARY:-kubectl}" KUBE_TMUX_SYMBOL_ENABLE="${KUBE_TMUX_SYMBOL_ENABLE:-true}" -KUBE_TMUX_SYMBOL_DEFAULT="${KUBE_TMUX_SYMBOL_DEFAULT:-\u2388 }" +KUBE_TMUX_SYMBOL_CUSTOM="${KUBE_TMUX_SYMBOL_CUSTOM}" KUBE_TMUX_SYMBOL_USE_IMG="${KUBE_TMUX_SYMBOL_USE_IMG:-false}" KUBE_TMUX_NS_ENABLE="${KUBE_TMUX_NS_ENABLE:-true}" KUBE_TMUX_DIVIDER="${KUBE_TMUX_DIVIDER-:}" @@ -48,6 +48,10 @@ _kube_tmux_symbol() { KUBE_TMUX_SYMBOL="${KUBE_TMUX_SYMBOL_IMG}" fi + if [ -n $KUBE_TMUX_SYMBOL_CUSTOM ]; then + KUBE_TMUX_SYMBOL="${KUBE_TMUX_SYMBOL_CUSTOM}" + fi + echo "${KUBE_TMUX_SYMBOL}" }