A Powerline segment for showing the active Kubernetes context and namespace
Project description
powerline-k8s
A custom Powerline segment for displaying the current Kubernetes context and namespace.
Installation
Local env
$ pip install .
Configuration
Colorscheme
Add the following config items to your Powerline colorscheme config file (usually located at ~/.config/powerline/colorschemes/
),
see Powerline Colorschemes for more info.
{
"k8s": { "fg": "solarized:blue", "bg": "solarized:base02", "attrs": [] },
"k8s_namespace": { "fg": "solarized:red", "bg": "solarized:base02", "attrs": [] },
"k8s_context": { "fg": "solarized:blue", "bg": "solarized:base02", "attrs": [] },
"k8s:divider": { "fg": "gray4", "bg": "solarized:base02", "attrs": [] }
}
Segment
Add the following config item to your Powerline segments config file (usually located at ~/.config/powerline/themes/shell/
),
see Powerline Segment reference for more info.
{
"function": "powerline_k8s.k8s",
"priority": 30
}
Toggle visibility
Toggle entire segment or specific section's visibility with the following environment variables:
POWERLINE_K8S_SHOW
POWERLINE_K8S_SHOW_NS
# toggle segment visibility
$ POWERLINE_K8S_SHOW=0 powerline-daemon --replace # hide powerline-k8s segment
$ POWERLINE_K8S_SHOW=1 powerline-daemon --replace # show powerline-k8s segment (default)
# toggle namespace section visibility
$ POWERLINE_K8S_SHOW_NS=0 powerline-daemon --replace # hide namespace section
$ POWERLINE_K8S_SHOW_NS=1 powerline-daemon --replace # show namespace section (default)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
powerline-k8s-1.0.0.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for powerline_k8s-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90976d929aa39cd9900db17f786ffee1fc7ccb5ce8bca83e1fa837b159706938 |
|
MD5 | 87e50c390b8a24ae5ebd0aea419b7f25 |
|
BLAKE2b-256 | a45c082551f7805b8aaee2fc75492b17b08b8e63251113cb8157128ef22c2eaa |