commit 581c83fb48d9e9962f637514c878ecb63efb4f20
parent 3c5c3d62449387e9a1175736566504396068d439
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 28 Jul 2022 13:52:36 +0200
users/vincent: add kubectl-config-switcher to zsh…
… and update plugins to their latest versions.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
3 files changed, 29 insertions(+), 15 deletions(-)
diff --git a/users/vincent/containers/kubernetes.nix b/users/vincent/containers/kubernetes.nix
@@ -24,6 +24,7 @@ in
bekind
stern
my.chmouzies.kubernetes
+ kubectx
];
programs.zsh.initExtra = ''
alias -g SK="|sugarjazy -s --kail --kail-prefix-format='{pod}'"
diff --git a/users/vincent/core/zsh.nix b/users/vincent/core/zsh.nix
@@ -67,6 +67,7 @@ in
source $HOME/${config.programs.zsh.dotDir}/completion.zsh
source $HOME/${config.programs.zsh.dotDir}/plugins/powerlevel10k/powerlevel10k.zsh-theme
source $HOME/${config.programs.zsh.dotDir}/prompt.zsh
+ source $HOME/${config.programs.zsh.dotDir}/plugins/kubectl-config-switcher/kubectl-config-switcher.plugin.zsh
setopt HIST_IGNORE_SPACE
alias -g L="|less"
alias -g EEL=' 2>&1 | less'
@@ -91,12 +92,21 @@ in
sessionVariables = { RPROMPT = ""; };
plugins = [
{
+ name = "kubectl-config-switcher";
+ src = pkgs.fetchFromGitHub {
+ owner = "chmouel";
+ repo = "kubectl-config-switcher";
+ rev = "faccc5d3c1f98170c38d3889f50fe74f3f6fe2cc";
+ sha256 = "sha256-BOMvC/r6uN9Hewp8OxPIp38+V9Usp6XbMvNoDim0qmc=";
+ };
+ }
+ {
name = "emoji-cli";
src = pkgs.fetchFromGitHub {
owner = "b4b4r07";
repo = "emoji-cli";
- rev = "26e2d67d566bfcc741891c8e063a00e0674abc92";
- sha256 = "0n88w4k5vaz1iyikpmlzdrrkxmfn91x5s4q405k1fxargr1w6bmx";
+ rev = "0fbb2e48e07218c5a2776100a4c708b21cb06688";
+ sha256 = "sha256-ii7RDTK/m+IqK7N+Xb6cEbziLPUQh7ZsbvQiX56F0sE=";
};
}
{
@@ -104,8 +114,8 @@ in
src = pkgs.fetchFromGitHub {
owner = "agkozak";
repo = "zsh-z";
- rev = "5b903f8f5489783ee2a4af668a941b7d9a02efc9";
- sha256 = "07h6ksiqgqyf5m84hv5xf4jcqrl8q1cj8wd4z52cjmy82kk10fkn";
+ rev = "aaafebcd97424c570ee247e2aeb3da30444299cd";
+ sha256 = "sha256-9Wr4uZLk2CvINJilg4o72x0NEAl043lP30D3YnHk+ZA=";
};
}
{
@@ -113,8 +123,8 @@ in
src = pkgs.fetchFromGitHub {
owner = "mafredri";
repo = "zsh-async";
- rev = "v1.7.0";
- sha256 = "1jbbypgn0r4pilhv2s2p11vbkkvlnf75wrhxfcvr7bfjpzyp9wbc";
+ rev = "v1.8.5";
+ sha256 = "sha256-mpXT3Hoz0ptVOgFMBCuJa0EPkqP4wZLvr81+1uHDlCc=";
};
}
{
@@ -122,8 +132,8 @@ in
src = pkgs.fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-completions";
- rev = "922eee0706acb111e9678ac62ee77801941d6df2";
- sha256 = "04skzxv8j06f1snsx62qnca5f2183w0wfs5kz78rs8hkcyd6g89w";
+ rev = "0.34.0";
+ sha256 = "sha256-qSobM4PRXjfsvoXY6ENqJGI9NEAaFFzlij6MPeTfT0o=";
};
}
{
@@ -131,8 +141,8 @@ in
src = pkgs.fetchFromGitHub {
owner = "romkatv";
repo = "powerlevel10k";
- rev = "700910cd0421a7d25d2800cefa76eb6d80dc62a8";
- sha256 = "011ja4r3a8vbcs42js9nri4p8pi8z4ccqxl2qyf52pn3pfnidigj";
+ rev = "v1.16.1";
+ sha256 = "sha256-DLiKH12oqaaVChRqY0Q5oxVjziZdW/PfnRW1fCSCbjo=";
};
}
{
@@ -140,8 +150,8 @@ in
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
- rev = "v0.1.0";
- sha256 = "0snhch9hfy83d4amkyxx33izvkhbwmindy0zjjk28hih1a9l2jmx";
+ rev = "v0.5.0";
+ sha256 = "sha256-IT3wpfw8zhiNQsrw59lbSWYh0NQ1CUdUtFzRzHlURH0=";
};
}
];
diff --git a/users/vincent/core/zsh/prompt.zsh b/users/vincent/core/zsh/prompt.zsh
@@ -682,6 +682,7 @@
# '*test*' TEST # to match your needs. Customize them as needed.
'*' DEFAULT)
typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=134
+
# typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'
# Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext
@@ -722,11 +723,13 @@
# - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012
# - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1
# - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01
- typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
+ typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION='%F{13}${${${:-$KCS_PROFILE}:-$P9K_KUBECONTEXT_CLUSTER}}%f'
+ # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION=
# Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.
- POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
+ # POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'
+ POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='/%F{3}${${:-$P9K_KUBECONTEXT_NAMESPACE}:-default}%f'
# Append the current context's namespace if it's not "default".
- POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
+ # POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'
# Custom prefix.
# typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%fat '