mirror of
https://github.com/zoriya/flake.git
synced 2026-06-09 05:05:00 +00:00
Add k8s context to left prompt
This commit is contained in:
@@ -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)";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user