Skip to content

xdeama/k9s-skin-selector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

k9s-skin

A POSIX sh script for macOS and Linux to interactively switch k9s skins.

Verified with https://www.shellcheck.net.

Example

example.png

Usage

chmod +x k9s-skin.sh

./k9s-skin.sh              # interactive picker
./k9s-skin.sh dracula      # apply a skin directly by name

Dependencies

Required

Tool Purpose Install
k9s The Kubernetes TUI being configured brew install k9s / brew install k9s (Linux via Homebrew)

Optional

Tool Purpose Install Fallback
fzf Fuzzy skin picker with live YAML preview brew install fzf Numeric menu

Assumed present (standard macOS/Linux)

These require no installation:

sh, find, grep, sed, sort, tr, head, wc, cp, printf, basename, dirname, readlink

How it works

  1. Detects the OS and resolves the correct k9s config path
  2. Scans the skins directory for *.yaml theme files
  3. Also checks for bundled skins shipped alongside the k9s binary
  4. With fzf: presents a fuzzy picker with a live preview of each skin's YAML in the right pane
  5. Without fzf: presents a numbered menu
  6. Edits config.yaml in-place, backing it up as config.yaml.bak first

Config paths

OS Path
macOS ~/Library/Application Support/k9s/
Linux ~/.config/k9s/ (or $XDG_CONFIG_HOME/k9s/)

Adding skins

See k9s documentation https://k9scli.io/topics/skins/.

Community skins are available at the k9s skins repo.

About

Bash script for interactive k9s skin selection

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages