Browse Source

[zsh] Switch to spaceship prompt

Emmanuel Bouthenot 3 years ago
parent
commit
ca0d65caaf
2 changed files with 60 additions and 3 deletions
  1. 58 0
      .zsh/config/60_spaceship.zsh
  2. 2 3
      .zshrc

+ 58 - 0
.zsh/config/60_spaceship.zsh

@@ -0,0 +1,58 @@
+#
+# SpaceShip configuration
+#
+
+SPACESHIP_PROMPT_ORDER=(
+# time          # Time stamps section
+  user          # Username section
+  dir           # Current directory section
+  host          # Hostname section
+# git           # Git section (git_branch + git_status)
+# hg            # Mercurial section (hg_branch  + hg_status)
+  package       # Package version
+# gradle        # Gradle section
+# maven         # Maven section
+# node          # Node.js section
+# ruby          # Ruby section
+# elixir        # Elixir section
+# xcode         # Xcode section
+# swift         # Swift section
+  golang        # Go section
+  php           # PHP section
+  rust          # Rust section
+# haskell       # Haskell Stack section
+# julia         # Julia section
+  docker        # Docker section
+# aws           # Amazon Web Services section
+# gcloud        # Google Cloud Platform section
+  venv          # virtualenv section
+# conda         # conda virtualenv section
+  pyenv         # Pyenv section
+# dotnet        # .NET section
+# ember         # Ember.js section
+# kubectl       # Kubectl context section
+# terraform     # Terraform workspace section
+# exec_time     # Execution time
+# line_sep      # Line break
+# battery       # Battery level and status
+#  vi_mode       # Vi-mode indicator
+  jobs          # Background jobs indicator
+  exit_code     # Exit code section
+  char          # Prompt character
+)
+
+SPACESHIP_RPROMPT_ORDER=(
+  git           # Git section (git_branch + git_status)
+  exec_time     # Execution time
+)
+
+SPACESHIP_PROMPT_ADD_NEWLINE=false
+SPACESHIP_PROMPT_SEPARATE_LINE=false
+SPACESHIP_CHAR_SYMBOL="❱ "
+SPACESHIP_CHAR_SYMBOL_ROOT="❱❱❱ "
+
+SPACESHIP_DIR_PREFIX=""
+SPACESHIP_DIR_TRUNC_REPO=false
+
+SPACESHIP_HOST_PREFIX="@"
+

+ 2 - 3
.zshrc

@@ -17,17 +17,16 @@ zplug "modules/dpkg", from:prezto
 zplug "modules/editor", from:prezto
 zplug "modules/environment", from:prezto
 zplug "modules/terminal", from:prezto, defer:2
-zplug "modules/editor", from:prezto
 zplug "modules/git", from:prezto
 zplug "modules/history", from:prezto
-zplug "modules/directory", from:prezto
 zplug "modules/spectrum", from:prezto
 zplug "modules/rsync", from:prezto
+zplug "modules/autosuggestions", from:prezto
 zplug "modules/syntax-highlighting", from:prezto, defer:2
 zplug "modules/history-substring-search", from:prezto
 zplug "mafredri/zsh-async"
 zplug "chrissicool/zsh-256color"
-zplug "k0lter/zsh-themes", as:theme
+zplug "spaceship-prompt/spaceship-prompt", use:spaceship.zsh, from:github, as:theme
 
 if [[ -d "${ZSHDOTDIR}/config" ]]; then
     zplug "${ZSHDOTDIR}/config", from:local, defer:1