Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 5 additions & 1 deletion kube.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -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-:}"
Expand Down Expand Up @@ -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}"
}

Expand Down