From 34cd2f49b3bd79c53202212bced1f5c0dd268109 Mon Sep 17 00:00:00 2001 From: Marcel Robitaille Date: Wed, 3 Jun 2020 15:41:26 -0300 Subject: [PATCH] Use pure prompt It's async and way faster than spaceship --- .gitmodules | 3 +++ config.yaml | 7 +++++++ pure | 1 + zsh/.zshrc | 22 +++++++++++----------- 4 files changed, 22 insertions(+), 11 deletions(-) create mode 160000 pure diff --git a/.gitmodules b/.gitmodules index c7fe7e9..f9fa1df 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,6 +4,9 @@ [submodule "dotdrop"] path = dotdrop url = https://github.com/deadc0de6/dotdrop.git +[submodule "pure"] + path = pure + url = https://github.com/sindresorhus/pure.git [submodule "zsh-async"] path = zsh-async url = https://github.com/mafredri/zsh-async.git diff --git a/config.yaml b/config.yaml index cc56a88..77aaaca 100644 --- a/config.yaml +++ b/config.yaml @@ -336,6 +336,10 @@ dotfiles: - oh-my-zsh-install - spaceship-install - tmuxinator-completion + zsh_prompt: + src: ./pure + dst: ~/.zsh/pure + link: link zsh_async: src: ./zsh-async dst: ~/.zsh/async @@ -388,6 +392,7 @@ profiles: - zathura - zshrc - zsh_custom + - zsh_prompt - zsh_async Hermes: dotfiles: @@ -435,12 +440,14 @@ profiles: - zathura - zshrc - zsh_custom + - zsh_prompt - zsh_async marcel-VirtualBox: dotfiles: - vim - zshrc - zsh_custom + - zsh_prompt - zsh_async - tmux - xbindkeys diff --git a/pure b/pure new file mode 160000 index 0000000..c42bd35 --- /dev/null +++ b/pure @@ -0,0 +1 @@ +Subproject commit c42bd354943ba4cf2da3ecf493fca4fef0b2722c diff --git a/zsh/.zshrc b/zsh/.zshrc index a8417f2..132f3a1 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,17 +1,9 @@ export ZSH=$HOME/.oh-my-zsh export FPATH=/usr/share/zsh/site-functions:/usr/share/zsh/functions/Calendar:/usr/share/zsh/functions/Chpwd:/usr/share/zsh/functions/Completion:/usr/share/zsh/functions/Completion/Base:/usr/share/zsh/functions/Completion/Linux:/usr/share/zsh/functions/Completion/Unix:/usr/share/zsh/functions/Completion/X:/usr/share/zsh/functions/Completion/Zsh:/usr/share/zsh/functions/Exceptions:/usr/share/zsh/functions/Math:/usr/share/zsh/functions/MIME:/usr/share/zsh/functions/Misc:/usr/share/zsh/functions/Newuser:/usr/share/zsh/functions/Prompts:/usr/share/zsh/functions/TCP:/usr/share/zsh/functions/VCS_Info:/usr/share/zsh/functions/VCS_Info/Backends:/usr/share/zsh/functions/Zftp:/usr/share/zsh/functions/Zle:$FPATH -ZSH_THEME="spaceship" -SPACESHIP_DIR_TRUNC=0 -SPACESHIP_DIR_TRUNC_REPO=false -SPACESHIP_BATTERY_SHOW=false -SPACESHIP_EXEC_TIME_SHOW=false -SPACESHIP_NODE_SHOW=true -SPACESHIP_PACKAGE_SHOW=false -SPACESHIP_PHP_SHOW=false -export RPS1="%{$reset_color%}" - -plugins=(git pass vi-mode django) +ZSH_THEME="" + +plugins=(git pass django) source "$ZSH/oh-my-zsh.sh" source "$HOME/.zsh/async/async.zsh" @@ -42,6 +34,13 @@ async_start_worker nvm_worker -n async_register_callback nvm_worker load_nvm async_job nvm_worker sleep 0.1 +fpath+=$HOME/.zsh/pure +autoload -U promptinit; promptinit +prompt pure + +# Show git stash in prompt +zstyle :prompt:pure:git:stash show yes + # Up/down search for matches of what's already there autoload -Uz up-line-or-beginning-search down-line-or-beginning-search zle -N up-line-or-beginning-search @@ -51,4 +50,5 @@ bindkey '^N' down-line-or-beginning-search bindkey '^[[A' up-line-or-beginning-search bindkey '^[[B' down-line-or-beginning-search +# Vi mode bindkey -v