summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Juan Loeza Sierra <jj@xz6ze.com>2026-03-21 00:05:45 -0700
committerJosé Juan Loeza Sierra <jj@xz6ze.com>2026-03-21 00:06:06 -0700
commit122fe182e2c0c0f7c0d8713fe78aef1e0ab8e15f (patch)
treec6bbcb4c936e78a9bd81f82378c78b64ddf46531
parent979778ea9a11462f8dff3a2e110fa24f2d87a19b (diff)
remove starship and modify default bash prompt
I added the git prompt and the container indicator to the prompt. No need for starship now.
-rw-r--r--dot-bashrc13
-rw-r--r--dot-config/starship.toml44
2 files changed, 10 insertions, 47 deletions
diff --git a/dot-bashrc b/dot-bashrc
index d8c4f02..75ef63b 100644
--- a/dot-bashrc
+++ b/dot-bashrc
@@ -14,6 +14,11 @@ export EDITOR=nvim
# include home binaries
export PATH=$PATH:~/.bin
+# add git prompt
+# https://wiki.archlinux.org/title/Git#Git_prompt
+source /usr/share/git/completion/git-prompt.sh
+PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
+
# include bob (neovim) path
# goes first to take priority over standard nvim
export PATH=~/.local/share/bob/nvim-bin:$PATH
@@ -91,12 +96,14 @@ alias dev="distrobox enter dev"
# direnv
eval "$(direnv hook bash)"
-# starship
-eval "$(starship init bash)"
-
# zoxide
eval "$(zoxide init bash)"
+# add container id to prompt when in a container
+if [[ -n "$CONTAINER_ID" ]]; then
+ PS1="($CONTAINER_ID) $PS1"
+fi
+
# include dev bashrc when in `dev` distrobox
if [ "$CONTAINER_ID" = "dev" ]; then
source ~/.bashrc.d/dev.bashrc
diff --git a/dot-config/starship.toml b/dot-config/starship.toml
deleted file mode 100644
index ec88341..0000000
--- a/dot-config/starship.toml
+++ /dev/null
@@ -1,44 +0,0 @@
-format = """
-\\[$username@$hostname $directory\\] \
-$container\
-$git_branch$git_commit$git_state$git_status\
-
-$line_break\
-
-\\$
-"""
-
-[username]
-format = "[$user]($style)"
-show_always = true
-style_user = "foreground"
-
-[hostname]
-format = "[$hostname]($style)"
-ssh_only = false
-style = "foreground"
-
-[directory]
-format = '[$path]($style)'
-truncation_length = 1
-style = "foreground"
-
-[container]
-format = '[\[$name\]]($style) '
-style = 'bright-white dimmed'
-
-[git_branch]
-format = "[$symbol$branch(:$remote_branch)]($style) "
-only_attached = false
-style = "bold green"
-symbol = " "
-
-[git_commit]
-format = "[( $hash $tag)]($style) "
-style = "bold green"
-tag_disabled = false
-tag_symbol = " "
-
-[git_status]
-format = "[($all_status$ahead_behind)]($style)"
-style = "bold red"