hi, i created this script which will fetch all the available plugins (and skins) and add them all to the correct file (according to XDG config)...
#!/usr/bin/env bash
base="$HOME/.config/k9s"
custom="$base/custom"
remote="$base/remote"
backup="$base/backup"
mkdir -p "$custom" "$remote" "$backup"
DATA=$(date +%Y-%m-%d_%Hh%Mm)
git clone --depth 1 --filter=blob:none --sparse https://github.com/derailed/k9s $remote > /dev/null 2>&1
cd $remote
git sparse-checkout set plugins skins
[ -f "$base/plugins.yaml" ] && mv "$base/plugins.yaml" "$backup/plugins-$DATA.yaml"
echo "plugins:" > "$base/plugins.yaml"
for i in $(ls $remote/plugins/*.yaml); do cat $i | grep -v "plugins:" | grep -v "plugins.yaml" >> "$base/plugins.yaml" ; done
if compgen -G "$custom/*.yaml" > /dev/null; then
for i in $(ls $custom/*.yaml); do cat $i | grep -v "plugins:" | grep -v "plugins.yaml" >> "$base/plugins.yaml" ; done
fi
cp -a "$remote/skins" "$base"
only problem, not related to my script, is that many plugins have identical shortcuts configured, having them conflicting if logFile is enabled:
[90m11:52AM[0m [32mINF[0m [1m🐶 K9s starting up...[0m
[90m11:52AM[0m [31mERR[0m [1mFail to locate metrics-server[0m [36merror=[0m[31m[1m"No metrics api group metrics.k8s.io found on cluster"[0m[0m
[90m11:52AM[0m [32mINF[0m [1m✅ Kubernetes connectivity[0m
[90m11:53AM[0m [32mINF[0m [1m🐶 K9s starting up...[0m
[90m11:53AM[0m [32mINF[0m [1m✅ Kubernetes connectivity[0m
[90m12:02PM[0m [32mINF[0m [1m🐶 K9s starting up...[0m
[90m12:02PM[0m [32mINF[0m [1m✅ Kubernetes connectivity[0m
[90m12:02PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"[0m
[90m12:02PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "loki-pods"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "log-less"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-L" in "loki-pods"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-A" in "trace"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "log-less"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "log-less"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Shift-A" in "trace"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-L" in "loki-pods"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "stern"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-L" in "loki-pods"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-T" in "open-terminal"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"
duplicate plugin key found for "Ctrl-T" in "duplicate-pod"
duplicate plugin key found for "Shift-L" in "log-less"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-L" in "stern"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Shift-L" in "loki-pods"[0m
[90m12:03PM[0m [33mWRN[0m [1mPlugins load failed: duplicate plugin key found for "Ctrl-T" in "open-terminal"
duplicate plugin key found for "Shift-A" in "trace"
duplicate plugin key found for "Shift-L" in "loki-pods"
duplicate plugin key found for "Ctrl-L" in "raw-logs-follow"
duplicate plugin key found for "Ctrl-X" in "kube-lineage"
duplicate plugin key found for "Ctrl-L" in "loki-pods-raw"[0m
any way to fix them? Maybe i can select different ones for each, and open a PR, anyone interested?
hi, i created this script which will fetch all the available plugins (and skins) and add them all to the correct file (according to XDG config)...
only problem, not related to my script, is that many plugins have identical shortcuts configured, having them conflicting if logFile is enabled:
any way to fix them? Maybe i can select different ones for each, and open a PR, anyone interested?