Add k8s context to left prompt

This commit is contained in:
2025-07-14 15:50:35 +02:00
parent 37f5027c90
commit 7f1f556cdf
+12 -8
View File
@@ -9,13 +9,13 @@
format = lib.concatStrings [
"$fill"
"$hostname"
"$kubernetes"
"$python"
"$nix_shell"
"$container"
"$line_break"
"$directory"
"[(\\($git_branch$git_commit$git_status$git_state\\) )](green)"
"$kubernetes"
"$shlvl"
"$character"
];
@@ -80,6 +80,17 @@
disabled = false;
};
kubernetes = {
format = "[$context(/$namespace) ]($style)";
disabled = false;
contexts = [
{
context_pattern = "colima-lucca-apps";
context_alias = "lucca";
}
];
};
cmd_duration = {
format = " [$duration]($style)";
};
@@ -103,13 +114,6 @@
format = "[ $name]($style)";
};
kubernetes = {
format = "[$symbol$context( \($namespace\))]($style)";
# only show it if using a custom config
detect_env_vars = ["KUBECONFIG"];
disabled = false;
};
hostname = {
format = "[ $ssh_symbol$hostname]($style)";
};