From 55be44f4db266e543b64831ea71096dbd80cdd19 Mon Sep 17 00:00:00 2001 From: paul-loedige Date: Tue, 1 Aug 2023 02:44:25 +0200 Subject: [PATCH] added powerlevel10k theme to zsh --- .gitmodules | 3 +++ zsh/.oh-my-zsh/custom/themes/powerlevel10k | 1 + zsh/.zshrc | 28 +++++++++------------- 3 files changed, 15 insertions(+), 17 deletions(-) create mode 160000 zsh/.oh-my-zsh/custom/themes/powerlevel10k diff --git a/.gitmodules b/.gitmodules index e64b180..97693fa 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "git/zippey"] path = git/zippey url = https://bitbucket.org/sippey/zippey.git +[submodule "zsh/.oh-my-zsh/custom/themes/powerlevel10k"] + path = zsh/.oh-my-zsh/custom/themes/powerlevel10k + url = https://github.com/romkatv/powerlevel10k.git diff --git a/zsh/.oh-my-zsh/custom/themes/powerlevel10k b/zsh/.oh-my-zsh/custom/themes/powerlevel10k new file mode 160000 index 0000000..f851f41 --- /dev/null +++ b/zsh/.oh-my-zsh/custom/themes/powerlevel10k @@ -0,0 +1 @@ +Subproject commit f851f41fc14d5bd66266b4b4af917d50c1c8b7fe diff --git a/zsh/.zshrc b/zsh/.zshrc index 9c4f200..399eb65 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,3 +1,10 @@ +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + # # ~/.zshrc # @@ -12,23 +19,7 @@ export EDITOR="nvim" # 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 # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes -ZSH_THEME="robbyrussell" -function powerline_precmd() { - PS1="$(powerline-shell --shell zsh $?)" -} - -function install_powerline_precmd() { - for s in "${precmd_functions[@]}"; do - if [ "$s" = "powerline_precmd" ]; then - return - fi - done - precmd_functions+=(powerline_precmd) -} - -if [ "$TERM" != "linux" ]; then - install_powerline_precmd -fi +ZSH_THEME="powerlevel10k/powerlevel10k" # Uncomment the following line to use case-sensitive completion. CASE_SENSITIVE="false" @@ -162,3 +153,6 @@ else fi unset __conda_setup # <<< conda initialize <<< + +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh