Kubernetes Plugin for DMS
September 2, 2026 · View on GitHub
A plugin that displays the current Kubernetes context in the DMS bar with the ability to switch between contexts.

Features
- Display current kubectl context in the DankBar
- Quick context switching via popup menu
- Opens on the active context: the list is scrolled to whichever context is current, rather than starting at the top
- Context filter appears automatically past 8 contexts. It takes keyboard focus when the popup opens, so you can type straight away: Enter switches to the first match, Esc clears the filter and then closes the popup
- Scrollable list with its own scrollbar past five contexts
- Header card showing the active context, the number of contexts and when they were last read
- Manual refresh with a spinner that tracks the actual
kubectlcall, and a toast when it completes - Configurable refresh interval
- Custom kubeconfig path support (default: ~/.kube/config)
- Auto-close popup after context selection
- Visual indicators for active context
- Compact mode: hide the context name and reveal it in a tooltip on hover
Installation
mkdir -p ~/.config/DankMaterialShell/plugins/
git clone https://github.com/psyreactor/dms-kubernetes.git kubernetes
Usage
- Open DMS Settings Super + ,
- Go to the "Plugins" tab
- Enable the "Kubernetes" plugin
- Configure settings if needed (kubeconfig path, refresh interval)
- Add the "kubernetes" widget to your DankBar configuration
Configuration
Settings
- Kubeconfig Path: Path to your Kubernetes config file (default:
~/.kube/config) - Refresh Interval: How often to re-read the kubeconfig, in seconds (range: 10-600, default: 15)
- Hide cluster name: Show only the icon in the bar and reveal the context name in a tooltip on hover (default: off)
- Time Format: How the last-updated time is rendered in the popup header — system default, 12-hour or 24-hour (default: system)
Widget Display
The widget shows:
- Bar: Kubernetes logo + current context name. On a vertical bar only the logo is drawn, with the context name on hover.
- Popup: a header card with the active context, the context count and the last-updated time, then the list of available contexts. Clicking one switches to it and closes the popup; the active one is marked and not clickable.
Files
plugin.json- Plugin manifest and metadataKubernetesWidget.qml- Main widget componentKubernetesSettings.qml- Settings interfaceREADME.md- This file
Permissions
This plugin requires:
settings_read- To read plugin configurationssettings_write- To save plugin configurations
Requirements
kubectlcommand-line tool must be installed and accessible in PATH- Valid kubeconfig file at the configured path
How It Works
The plugin uses kubectl commands to:
- Read the active context and the full context list in one call:
kubectl config view -o json - Switch contexts:
kubectl config use-context <context-name>
All commands respect the configured kubeconfig path.
Nothing is read from the clusters themselves — only the kubeconfig file — so the widget works whether or not the clusters are reachable.
Each widget instance owns its commands: with the widget on more than one bar, or on more than one monitor, the instances query independently and never share a result. Work still in flight when a bar is reconfigured or the plugin is reloaded is discarded rather than applied to a torn-down widget.