https://github.com/vitanovs/tmux-kubenv
Kubernetes environment indicator.
https://github.com/vitanovs/tmux-kubenv
precmd tmux tmux-configuration tmux-plugin tmux-statusline zsh
Last synced: 6 months ago
JSON representation
Kubernetes environment indicator.
- Host: GitHub
- URL: https://github.com/vitanovs/tmux-kubenv
- Owner: vitanovs
- License: mit
- Created: 2025-03-28T21:35:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-13T08:35:35.000Z (about 1 year ago)
- Last Synced: 2025-07-13T10:21:39.680Z (about 1 year ago)
- Topics: precmd, tmux, tmux-configuration, tmux-plugin, tmux-statusline, zsh
- Language: Shell
- Homepage:
- Size: 17.6 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tmux-kubenv
A [TMUX](https://github.com/tmux/tmux) plugin indicating the current [Kubernetes](https://kubernetes.io) context in use.
:white_check_mark: Per-`pane` context with automatic updates based on configuration _switches_ and _changes_.

## Installation
Using the [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm) to manage the configuration:
- _add_ the _plugin_ to your `~/.tmux.conf`:
```sh
set -g @plugin 'vitanovs/tmux-kubenv'
```
- _install_ with ` + I`
Once installed, instrument:
- `.tmux.conf` with `kubenv.tmux` utility to display the current context in your status line:
```sh
set -g status-left "#(/bin/sh ~/.tmux/plugins/tmux-kubenv/kubenv.tmux)"
```
- `.zshrc` to _enable_ the __automatic__ context _updates_:
```sh
source ~/.tmux/plugins/tmux-kubenv/scripts/hook_zsh.sh
tmux_kubenv_precmd_hook_enable > /dev/null
```
## Configuration
The plugin supports the following `global` configuration options:
| Name | Description | Default |
| :-------------------------------- | :------------------------------------------------ | :----------: |
| `@tmux_kubenv_title` | The _plugin_ title displayed in the status line | `Kubernetes` |
| `@tmux_kubenv_color_title` | The _color_ of the _plugin_ title | `#124F76` |
| `@tmux_kubenv_color_context_fg` | The _foreground color_ of the _context_ section | `#124F76` |
| `@tmux_kubenv_color_context_bg` | The _background color_ of the _context_ section | `#00DCEE` |
| `@tmux_kubenv_color_namespace_fg` | The _foreground color_ of the _namespace_ section | `#124F76` |
| `@tmux_kubenv_color_namespace_bg` | The _background color_ of the _namespace_ section | `#D69F00` |