aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.config/starship.toml36
-rw-r--r--.zshrc40
-rwxr-xr-xsetup.sh10
3 files changed, 44 insertions, 42 deletions
diff --git a/.config/starship.toml b/.config/starship.toml
new file mode 100644
index 0000000..3ecfacf
--- /dev/null
+++ b/.config/starship.toml
@@ -0,0 +1,36 @@
+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 69a1da6..78e1678 100644
--- a/.zshrc
+++ b/.zshrc
@@ -219,7 +219,6 @@ bindkey "^U" backward-kill-line
# C-j To go to the parent directory.
function __cd_parent_dir() {
pushd .. > /dev/null
- __update_vcs_info
zle reset-prompt
}
zle -N __cd_parent_dir
@@ -228,7 +227,6 @@ bindkey "^J" __cd_parent_dir
# C-o To go to the previous directory.
function __cd_prev_dir() {
popd > /dev/null
- __update_vcs_info
zle reset-prompt
}
zle -N __cd_prev_dir
@@ -248,40 +246,6 @@ 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 "+" # Not Staged
-zstyle ':vcs_info:*' max-reports 2
-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
@@ -355,3 +319,7 @@ 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 49178f3..d4d8cf1 100755
--- a/setup.sh
+++ b/setup.sh
@@ -1,14 +1,12 @@
#!/bin/sh
-for filename in .gitconfig .vim .vimrc .zshrc
+for name in .gitconfig .vim .vimrc .zshrc
do
- rm -f ~/$filename
- ln -s ~/dotfiles/$filename ~/$filename
+ ln -s -f ~/dotfiles/$name ~/$name
done
[ -d ~/.config ] || mkdir ~/.config
-for dirname in alacritty git
+for name in alacritty git starship.toml
do
- rm -f ~/.config/$dirname
- ln -s ~/dotfiles/.config/$dirname ~/.config/$dirname
+ ln -s -f ~/dotfiles/.config/$name ~/.config/$name
done