From 670fd299b1ae7db12f6691b7cd8c85c0806d63a8 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sun, 18 Nov 2018 18:35:28 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B8=D0=B3=D0=BB=D0=B0=D1=88?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .zshrc | 1 + prompt.zsh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 prompt.zsh diff --git a/.zshrc b/.zshrc index 13fda72..1ad813c 100644 --- a/.zshrc +++ b/.zshrc @@ -2,4 +2,5 @@ source $ZDOTDIR/env.zsh source $ZDOTDIR/history.zsh source $ZDOTDIR/options.zsh source $ZDOTDIR/plugins.zsh +source $ZDOTDIR/prompt.zsh diff --git a/prompt.zsh b/prompt.zsh new file mode 100644 index 0000000..0a41844 --- /dev/null +++ b/prompt.zsh @@ -0,0 +1,31 @@ +# Theme +# Install powerline font +SPACESHIP_PROMPT_ORDER=( + user # Username section + dir # Current directory section + host # Hostname section + git # Git section (git_branch + git_status) + hg # Mercurial section (hg_branch + hg_status) + exec_time # Execution time + line_sep # Line break + vi_mode # Vi-mode indicator + jobs # Background jobs indicator + exit_code # Exit code section + char # Prompt character +) + + +SPACESHIP_PROMPT_ADD_NEWLINE=false +SPACESHIP_PROMPT_SEPARATE_LINE=false +SPACESHIP_CHAR_SYMBOL="❯" +SPACESHIP_CHAR_SUFFIX=" " + +# Simplify prompt if we're using Hyper +if [[ "$TERM_PROGRAM" == "Hyper" ]]; then + SPACESHIP_PROMPT_SEPARATE_LINE=false + SPACESHIP_DIR_SHOW=false + SPACESHIP_GIT_BRANCH_SHOW=false +fi + +antibody bundle denysdovhan/spaceship-prompt +