k9s icon indicating copy to clipboard operation
k9s copied to clipboard

Is there a way to specify cluster skins without touching the cluster specific config file?

Open aschleifer opened this issue 1 year ago • 3 comments

Hi,

I love the feature of being able to define different skins for different clusters/contexts. However I like to keep my stable configuration in a git repository and thus would like to add this skin assignment to contexts in there.

Sadly it seems the $XDG_DATA_HOME/k9s/clusters/<cluster>/<context>/config.yaml gets rewritten everytime I change view or namespace for that context in k9s. This means the config file will always change and show my dotfile git repository as unclean.

I would like to be able to just specify a list of <context>: <skin> definitions in maybe the main config file.

aschleifer avatar Mar 04 '24 12:03 aschleifer

@aschleifer Thanks for this issue Andreas! context specific configs are meant to be dynamic to track the deltas between sessions. Perhaps we could introduce a flag in the main k9s config to only generate and not alter if users opt to manually curate their context configs if it does not exist. Would let the good folks here pipe in if this is something worth doing and provide value??

derailed avatar Mar 05 '24 00:03 derailed

Hm I recently had the case that somehow k9s overrode the skin in the config which was not very nice.

I really don't know if that config file is the right place to handle skins or something like that. a simple map of assigning skins to a context name in the main config file would feel more convenient.

/edit: well having the config files that currently exist not being edited by k9s would also work i guess.

aschleifer avatar Mar 08 '24 14:03 aschleifer

I would like k9s to sync with my system light-mode / dark-mode. Maybe configure both light and dark for each cluster? I found a --skin cli param was merged in ~v0.30 but it does not work in v0.32.4

cjmalloy avatar Apr 08 '24 17:04 cjmalloy