Skip to main content
Cloud widgets help you stay aware of your current cloud infrastructure context when working with Kubernetes and Terraform.

Kubernetes context

Displays the current Kubernetes context, including cluster, user, and namespace information. Supports AWS EKS ARN parsing.

Basic configuration

set -g @dracula-plugins "kubernetes-context"

Requirements

This widget requires kubectl to be installed and a valid kubeconfig file.

Options

@dracula-kubernetes-context-label
string
default:""
Label displayed before the context information.
@dracula-kubernetes-hide-user
boolean
default:"false"
Hide the user from the context string.
@dracula-kubernetes-eks-hide-arn
boolean
default:"false"
Hide ARN prefix for EKS clusters, showing only the cluster name. Only works when cluster names are ARNs.
@dracula-kubernetes-eks-extract-account
boolean
default:"false"
Extract and display the AWS account ID as a prefix to the cluster name. Only works when cluster names are ARNs.
@dracula-refresh-rate
number
default:"5"
Update interval in seconds.

Display format

The widget displays information in the format:
[label] [account/]user@cluster[:namespace]
  • account/ - Only shown when eks-extract-account is enabled
  • user@ - Hidden when hide-user is enabled
  • :namespace - Only shown when a namespace is set in the context

Usage examples

# Basic display
set -g @dracula-plugins "kubernetes-context"

# With custom label
set -g @dracula-kubernetes-context-label "☸ "

# Hide user for cleaner display
set -g @dracula-kubernetes-hide-user true

# EKS: Show only cluster name (hide ARN)
set -g @dracula-kubernetes-eks-hide-arn true

# EKS: Show account ID prefix
set -g @dracula-kubernetes-eks-extract-account true
set -g @dracula-kubernetes-eks-hide-arn true

EKS examples

For an EKS cluster with ARN:
arn:aws:eks:us-east-1:123456789012:cluster/my-cluster
Default display:
user@arn:aws:eks:us-east-1:123456789012:cluster/my-cluster:default
With eks-hide-arn:
user@my-cluster:default
With eks-extract-account and eks-hide-arn:
123456789012/user@my-cluster:default
With hide-user, eks-extract-account, and eks-hide-arn:
123456789012/my-cluster:default
Use eks-hide-arn to keep your status bar clean when working with EKS clusters. Combine with eks-extract-account if you manage multiple AWS accounts.

Terraform workspace

Displays the current Terraform workspace.

Basic configuration

set -g @dracula-plugins "terraform"

Requirements

This widget requires Terraform to be installed and the current directory to be a Terraform project.

Options

@dracula-terraform-label
string
default:""
Label displayed before the workspace name.
@dracula-refresh-rate
number
default:"5"
Update interval in seconds.

Usage examples

# Basic display
set -g @dracula-plugins "terraform"

# With custom label
set -g @dracula-terraform-label "tf: "

# With icon (Nerd Font)
set -g @dracula-terraform-label " "

Behavior

The widget displays the current Terraform workspace name (e.g., “default”, “staging”, “production”). It only shows information when:
  • The current tmux pane’s working directory contains a Terraform project
  • Terraform is properly initialized (.terraform directory exists)
The widget reads workspace information from the current pane’s working directory. Make sure to navigate to your Terraform project directory for the widget to display correctly.

Combining cloud widgets

Cloud widgets work well together for infrastructure management:
# Show both Kubernetes and Terraform context
set -g @dracula-plugins "kubernetes-context terraform"

# Customize labels
set -g @dracula-kubernetes-context-label "☸ "
set -g @dracula-terraform-label " "

# Optimize for EKS
set -g @dracula-kubernetes-hide-user true
set -g @dracula-kubernetes-eks-hide-arn true
set -g @dracula-kubernetes-eks-extract-account true

# Customize colors
set -g @dracula-kubernetes-context-colors "cyan dark_gray"
set -g @dracula-terraform-colors "light_purple dark_gray"

# Faster updates for active development
set -g @dracula-refresh-rate 3

Complete example

# Full cloud infrastructure context
set -g @dracula-plugins "kubernetes-context terraform"

# Kubernetes configuration
set -g @dracula-kubernetes-context-label "⎈ "
set -g @dracula-kubernetes-hide-user false
set -g @dracula-kubernetes-eks-hide-arn true
set -g @dracula-kubernetes-eks-extract-account true

# Terraform configuration
set -g @dracula-terraform-label "terraform: "

# Global settings
set -g @dracula-refresh-rate 5

# Color scheme
set -g @dracula-kubernetes-context-colors "cyan dark_gray"
set -g @dracula-terraform-colors "light_purple dark_gray"

Tips for cloud widgets

Cloud widgets are context-aware and only display when relevant. If you’re not in a Terraform directory or don’t have a kubeconfig set, the widgets will show nothing or a message like “kubeconfig not valid”.
Use @dracula-show-empty-plugins false to hide cloud widgets when they have no context to display, keeping your status bar clean.
Be mindful of sensitive information. If your cluster names or workspace names contain sensitive data, consider using custom labels or hiding certain information with the available options.

Build docs developers (and LLMs) love