aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.config/starship.toml36
-rw-r--r--.zshrc39
-rwxr-xr-xsetup.sh2
3 files changed, 36 insertions, 41 deletions
diff --git a/.config/starship.toml b/.config/starship.toml
deleted file mode 100644
index 3ecfacf..0000000
--- a/.config/starship.toml
+++ /dev/null
@@ -1,36 +0,0 @@
-format = """
-$directory\
-$git_branch\
-$git_commit\
-$git_state\
-$git_status\
-$line_break\
-$jobs\
-[❯](fg:150)[❯](fg:153)[❯](fg:159) """
-
-[directory]
-style = "fg:75 bold"
-truncation_length = 99
-truncate_to_repo = false
-read_only = ' \[RO\]'
-read_only_style = "fg:75 bold"
-
-[git_branch]
-format = "[$branch]($style) "
-style = "green"
-
-[git_state]
-format = '\([$state ($progress_current/$progress_total)]($style)\) '
-rebase = "rebase"
-merge = "merge"
-revert = "revert"
-cherry_pick = "cpick"
-bisect = "bisect"
-am = "am"
-am_or_rebase = "am/rebase"
-
-[git_status]
-style = "cyan"
-
-[jobs]
-symbol = "+ "
diff --git a/.zshrc b/.zshrc
index eb2fb3f..9b34ce5 100644
--- a/.zshrc
+++ b/.zshrc
@@ -221,6 +221,7 @@ function __cd_parent_dir() {
[ -e $BUFFER ] || return
pushd .. > /dev/null
+ __update_vcs_info
zle reset-prompt
}
zle -N __cd_parent_dir
@@ -231,6 +232,7 @@ function __cd_prev_dir() {
[ -e $BUFFER ] || return
popd > /dev/null
+ __update_vcs_info
zle reset-prompt
}
zle -N __cd_prev_dir
@@ -252,6 +254,39 @@ bindkey "^G" __cd_project_root_dir
zmodload zsh/complist
+
+autoload -Uz vcs_info
+
+
+zstyle ':vcs_info:git:*' check-for-changes true
+zstyle ':vcs_info:git:*' unstagedstr "+"
+zstyle ':vcs_info:*' formats " (%b)%u"
+zstyle ':vcs_info:*' actionformats ' (%b %a)%u'
+
+
+function __update_vcs_info() {
+ psvar=()
+ LANG=en_US.UTF-8 vcs_info
+ if [[ -n "$vcs_info_msg_0_" ]]; then
+ psvar[1]="$vcs_info_msg_0_"
+ fi
+}
+
+function precmd() {
+ __update_vcs_info
+}
+
+
+
+PROMPT="
+%75F%B%~%b%1(v,%1v,)
+%150F❯%153F❯%159F❯%f "
+
+PROMPT2="%63F❯%62F❯%61F❯%f "
+
+SPROMPT="%179F%BDid you mean %r? (n/y):%b%f "
+
+
HISTFILE=$HOME/.zsh_history
HISTSIZE=1000000
SAVEHIST=1000000
@@ -325,7 +360,3 @@ export PATH=/usr/local/opt/gettext/bin:$PATH
# To override system-provided Ruby with brewed Ruby
export PATH=/usr/local/opt/ruby/bin:$PATH
-
-
-
-eval "$(starship init zsh)"
diff --git a/setup.sh b/setup.sh
index dd68908..8ed8793 100755
--- a/setup.sh
+++ b/setup.sh
@@ -10,7 +10,7 @@ if [ ! -d ~/.config ]; then
mkdir ~/.config
fi
-for name in alacritty fish git starship.toml; do
+for name in alacritty fish git; do
if [ ! -L ~/.config/$name ]; then
ln -s -f ~/dotfiles/.config/$name ~/.config/$name
fi