diff --git a/setup-k9s.sh b/setup-k9s.sh new file mode 100644 index 0000000..6934b55 --- /dev/null +++ b/setup-k9s.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if !(command -v yq &>/dev/null); then + echo "yq is needed for config updates" + exit 1 +fi + +# Grab gruvbox-material-dark-soft skin +curl -so ~/.config/k9s/skins/gruvbox-material-dark-soft.yaml \ + 'https://raw.githubusercontent.com/derailed/k9s/refs/heads/master/skins/gruvbox-material-dark-soft.yaml' + +# Set k9s.ui.skin to gruvbox-material-dark-soft +config_file=$(cat ~/.config/k9s/config.yaml | yq --yaml-output '.k9s.ui.skin |= ("gruvbox-material-dark-soft")') + +# Set k9s.ui.logoless +config_file=$(echo "${config_file}" | yq --yaml-output '.k9s.ui.logoless |= (true)') + +# Set k9s.ui.splashless +config_file=$(echo "${config_file}" | yq --yaml-output '.k9s.ui.splashless |= (true)') + +# Setting config file contents +echo "${config_file}" >~/.config/k9s/config.yaml