feat: p10k for k8s, and mytheme for fast prompt
This commit is contained in:
parent
a5aad51d09
commit
725241d958
@ -1 +1 @@
|
|||||||
Subproject commit d3dd30ff0b811756e735eb9020609fa315bfbbcc
|
Subproject commit 9f7eed8133d62457f7ad2ca250eb9b837a4adeb7
|
@ -1 +1 @@
|
|||||||
Subproject commit cbf8762f15fac03a51eaa2c6f983d4a5045c95b4
|
Subproject commit e95c12cea141632d3502fad4fb1c9260a91a65f4
|
@ -1 +1 @@
|
|||||||
Subproject commit eadfcad580edc74b258dc1380f1e3edea35cc6d4
|
Subproject commit 507527711fdd8f701544024aeb1a9a068f986d89
|
1634
.config/zsh/.p10k.zsh
Normal file
1634
.config/zsh/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@ alias vi='$EDITOR'
|
|||||||
alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
||||||
alias viconf='(cd $XDG_CONFIG_HOME/nvim && $EDITOR .)'
|
alias viconf='(cd $XDG_CONFIG_HOME/nvim && $EDITOR .)'
|
||||||
alias wconf='(cd $HOME/.config/awesome && $EDITOR .)'
|
alias wconf='(cd $HOME/.config/awesome && $EDITOR .)'
|
||||||
alias zshconf='(cd $ZDOTDIR/ && $EDITOR . && . $ZDOTDIR/.zshrc)'
|
alias zconf='(cd $ZDOTDIR/ && $EDITOR . && . $ZDOTDIR/.zshrc)'
|
||||||
|
|
||||||
# dev
|
# dev
|
||||||
alias epitest='docker run -it --rm -v $PWD:/usr/app/ epitechcontent/epitest-docker bash'
|
alias epitest='docker run -it --rm -v $PWD:/usr/app/ epitechcontent/epitest-docker bash'
|
||||||
|
@ -8,7 +8,8 @@ export ZSH="$ZDOTDIR/ohmyzsh"
|
|||||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
ZSH_THEME="simpletheme"
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||||
|
#ZSH_THEME="mytheme"
|
||||||
|
|
||||||
# Set list of themes to pick from when loading at random
|
# Set list of themes to pick from when loading at random
|
||||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
@ -94,3 +95,6 @@ plugins=(vi-mode colored-man-pages git gitignore)
|
|||||||
. "$ZDOTDIR"/.docker_aliases
|
. "$ZDOTDIR"/.docker_aliases
|
||||||
. "$ZDOTDIR"/.kubectl_aliases
|
. "$ZDOTDIR"/.kubectl_aliases
|
||||||
. "$ZDOTDIR"/.zsh_aliases
|
. "$ZDOTDIR"/.zsh_aliases
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
|
||||||
|
! [ -f "$ZDOTDIR/.p10k.zsh" ] || . "$ZDOTDIR/.p10k.zsh"
|
||||||
|
6
.config/zsh/custom/themes/mytheme.zsh-theme
Normal file
6
.config/zsh/custom/themes/mytheme.zsh-theme
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
PROMPT='%(?::%{$fg_bold[red]%}%? )%{$fg_bold[cyan]%}%~%{$reset_color%} $(git_prompt_info)'
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
1
.config/zsh/custom/themes/powerlevel10k
Submodule
1
.config/zsh/custom/themes/powerlevel10k
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 7f2950f9cc6d7ae805b4e9f365cc3340afc955a6
|
@ -1,41 +0,0 @@
|
|||||||
KUBE_PS1_KUBECONFIG="${KUBECONFIG:-$HOME/.kube/config}"
|
|
||||||
KUBE_PS1_KUBECONFIGMD5=
|
|
||||||
KUBE_PS1_CTX=
|
|
||||||
KUBE_PS1_NS=
|
|
||||||
|
|
||||||
_update_KUBE_PS1() {
|
|
||||||
local md5="$(md5sum $KUBE_PS1_KUBECONFIG)"
|
|
||||||
|
|
||||||
[[ "$md5" == "$KUBE_PS1_KUBECONFIGMD5" ]] && return
|
|
||||||
|
|
||||||
KUBE_PS1_KUBECONFIGMD5="$md5"
|
|
||||||
KUBE_PS1_CTX="$(kubectl config current-context)"
|
|
||||||
KUBE_PS1_NS="$(kubectl config view --minify -o jsonpath='{..namespace}')"
|
|
||||||
}
|
|
||||||
|
|
||||||
kube_ps1() {
|
|
||||||
_update_KUBE_PS1
|
|
||||||
|
|
||||||
local ctx="$KUBE_PS1_CTX"
|
|
||||||
local ns="$KUBE_PS1_NS"
|
|
||||||
local symbol='\u2388 '
|
|
||||||
local sep='/'
|
|
||||||
local bg='\e[44m'
|
|
||||||
local reset='\e[0m'
|
|
||||||
#local end=" $reset\e[34m\ue0b4" #
|
|
||||||
#local end=" $reset\e[34m\ue0bc" #
|
|
||||||
local end=" $reset\e[34m\ue0b0" #
|
|
||||||
|
|
||||||
echo "$bg$symbol$ctx$sep$ns$end$reset"
|
|
||||||
}
|
|
||||||
|
|
||||||
precmd() {
|
|
||||||
kube_ps1
|
|
||||||
}
|
|
||||||
|
|
||||||
PROMPT='%(?::%{$fg_bold[red]%}%? )%{$fg_bold[cyan]%}%~%{$reset_color%} $(git_prompt_info)'
|
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg[red]%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
|
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
|
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
|
|
@ -1 +1 @@
|
|||||||
Subproject commit 29cf199b5d84eb4897f2e0e421a344174568eb9f
|
Subproject commit 3705edf557922f286a5054523d6d7208e2ed6f5e
|
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -31,3 +31,6 @@
|
|||||||
[submodule ".config/zsh/ohmyzsh"]
|
[submodule ".config/zsh/ohmyzsh"]
|
||||||
path = .config/zsh/ohmyzsh
|
path = .config/zsh/ohmyzsh
|
||||||
url = https://github.com/ohmyzsh/ohmyzsh.git
|
url = https://github.com/ohmyzsh/ohmyzsh.git
|
||||||
|
[submodule ".config/zsh/custom/themes/powerlevel10k"]
|
||||||
|
path = .config/zsh/custom/themes/powerlevel10k
|
||||||
|
url = https://github.com/romkatv/powerlevel10k.git
|
||||||
|
Loading…
Reference in New Issue
Block a user