From a86e9fc69ebe480f610d52c4fdeb965fbca0c252 Mon Sep 17 00:00:00 2001 From: Yax <1949284+kianby@users.noreply.github.com> Date: Mon, 4 Apr 2022 08:46:20 +0200 Subject: [PATCH] mise en place de starship --- dot_bashrc | 2 +- dot_bashrc.d/fzf.bashrc.tmpl | 2 +- private_dot_config/starship.toml | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dot_bashrc b/dot_bashrc index 2b1b7c3..85d78b7 100644 --- a/dot_bashrc +++ b/dot_bashrc @@ -57,7 +57,7 @@ alias vi=$EDITOR # PROMPT # --------------------------------------------------------------------------- -if [ -f "$HOME/.local/bin/starship" ]; then +if hash starship 2>/dev/null; then eval "$(starship init bash)" else # set a minimalist prompt diff --git a/dot_bashrc.d/fzf.bashrc.tmpl b/dot_bashrc.d/fzf.bashrc.tmpl index 201e5b6..98f4bae 100644 --- a/dot_bashrc.d/fzf.bashrc.tmpl +++ b/dot_bashrc.d/fzf.bashrc.tmpl @@ -11,7 +11,7 @@ export FZF_DEFAULT_OPTS='--height 40% --reverse --border' # quickly find a project p(){ - cd {{ .projectdir }} && `__fzf_cd__` + cd {{ .projectdir }} && `__fzf_cd__` && [[ -d ".git" ]] && git fetch } diff --git a/private_dot_config/starship.toml b/private_dot_config/starship.toml index a3a17ab..48d2ca4 100644 --- a/private_dot_config/starship.toml +++ b/private_dot_config/starship.toml @@ -6,5 +6,13 @@ truncation_length = 5 truncation_symbol = "…/" truncate_to_repo = false +[git_status] +ahead = "⇡${count}" +diverged = "⇕⇡${ahead_count}⇣${behind_count}" +behind = "⇣${count}" + [package] disabled = true + +[java] +disabled = true