added eks support for kubernetes prompt

This commit is contained in:
Dor Munis 2023-05-12 18:06:09 +03:00
parent a787cd1f4a
commit 31327163a1
3 changed files with 54 additions and 4 deletions

View file

@ -8,6 +8,10 @@ source $current_dir/utils.sh
main()
{
# set configuration option variables
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
eks_hide_arn=$(get_tmux_option "@dracula-kubernetes-eks-hide-arn" false)
eks_extract_account=$(get_tmux_option "@dracula-kubernetes-eks-extract-account" false)
hide_kubernetes_user=$(get_tmux_option "@dracula-kubernetes-hide-user" false)
show_fahrenheit=$(get_tmux_option "@dracula-show-fahrenheit" true)
show_location=$(get_tmux_option "@dracula-show-location" true)
fixed_location=$(get_tmux_option "@dracula-fixed-location")
@ -23,7 +27,6 @@ main()
show_day_month=$(get_tmux_option "@dracula-day-month" false)
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
time_format=$(get_tmux_option "@dracula-time-format" "")
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)
@ -195,8 +198,7 @@ main()
elif [ $plugin = "kubernetes-context" ]; then
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-kubernetes-context-colors" "cyan dark_gray")
script="#($current_dir/kubernetes_context.sh $show_kubernetes_context_label)"
script="#($current_dir/kubernetes_context.sh $eks_hide_arn $eks_extract_account $hide_kubernetes_user $show_kubernetes_context_label)"
elif [ $plugin = "weather" ]; then
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-weather-colors" "orange dark_gray")
script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location $fixed_location)"