From 123d6c4af47a2b70a402800b5178f901dc990356 Mon Sep 17 00:00:00 2001 From: Lucas Giacomazzi Date: Tue, 9 Feb 2021 17:51:26 -0300 Subject: [PATCH 1/3] Allow custom symbol --- kube.tmux | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kube.tmux b/kube.tmux index a88055a..0734f68 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_DEFAULT ]; then + KUBE_TMUX_SYMBOL="${KUBE_TMUX_SYMBOL_DEFAULT}" + fi + echo "${KUBE_TMUX_SYMBOL}" } From ae4fdcb6c7bdf55f84b86577b3ee015e20381160 Mon Sep 17 00:00:00 2001 From: Lucas Giacomazzi Date: Tue, 9 Feb 2021 18:04:46 -0300 Subject: [PATCH 2/3] Add installation using tpm --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 From 8526b71c8ea6b0a8309cdc4c3ce9ec0bb473f923 Mon Sep 17 00:00:00 2001 From: Lucas Giacomazzi Date: Tue, 9 Feb 2021 18:05:21 -0300 Subject: [PATCH 3/3] Fixing custom symbol variables --- kube.tmux | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kube.tmux b/kube.tmux index 0734f68..6520141 100644 --- a/kube.tmux +++ b/kube.tmux @@ -48,8 +48,8 @@ _kube_tmux_symbol() { KUBE_TMUX_SYMBOL="${KUBE_TMUX_SYMBOL_IMG}" fi - if [ -n $KUBE_TMUX_SYMBOL_DEFAULT ]; then - KUBE_TMUX_SYMBOL="${KUBE_TMUX_SYMBOL_DEFAULT}" + if [ -n $KUBE_TMUX_SYMBOL_CUSTOM ]; then + KUBE_TMUX_SYMBOL="${KUBE_TMUX_SYMBOL_CUSTOM}" fi echo "${KUBE_TMUX_SYMBOL}"