- install https://www.iterm2.com/documentation-shell-integration.html
- read https://www.iterm2.com/documentation-status-bar.html
Put something like this in your profile config:
function iterm2_print_user_vars() {
iterm2_set_user_var kubeContext $(k_current_context)
iterm2_set_user_var kubeNamespace $(k_current_namespace)
}
- add "Interpolated string" component into the status bar
- use this expression:
\(user.kubeContext)/\(user.kubeNamespace)
- use this expression: