summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--.bashrc25
-rw-r--r--.config/starship.toml54
2 files changed, 66 insertions, 13 deletions
diff --git a/.bashrc b/.bashrc
index 11b6c04..67e6167 100644
--- a/.bashrc
+++ b/.bashrc
@@ -37,9 +37,8 @@ if [ -d /usr/libexec/z_lua ]; then
 	eval "$(luajit /usr/libexec/z_lua/z.lua --init bash enhanced once fzf)"
 	# safe_load /usr/libexec/z_lua/czmod/czmod.bash
 fi
-
-# enable navi
-eval "$(navi widget bash)"
+# enable starship
+eval "$(starship init bash)"
 
 # Use keychain to reuse the ssh-agent and gpg-agent between logins
 keychain --agents ssh,gpg -q id_rsa # AF6AB8C8B10436B9F61293632143BD2AAB94BCC4
@@ -48,16 +47,16 @@ safe_load "$HOME/.keychain/$(hostname)-sh-gpg"
 
 # Set prompt
 # export PS1="$(prompt)"
-if ! [[ "${PROMPT_COMMAND:-}" =~ _prompt_hook ]]; then
-	PROMPT_COMMAND="_prompt_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
-fi
-_prompt_hook() {
-	if [ "$?" != 0 ]; then
-		PS1=$(prompt err)
-	else
-		PS1=$(prompt)
-	fi
-}
+# if ! [[ "${PROMPT_COMMAND:-}" =~ _prompt_hook ]]; then
+# 	PROMPT_COMMAND="_prompt_hook${PROMPT_COMMAND:+;$PROMPT_COMMAND}"
+# fi
+# _prompt_hook() {
+# 	if [ "$?" != 0 ]; then
+# 		PS1=$(prompt err)
+# 	else
+# 		PS1=$(prompt)
+# 	fi
+# }
 
 # Alias shell commands
 # alias logout='dbus-send --session --type=method_call --print-reply --dest='
diff --git a/.config/starship.toml b/.config/starship.toml
new file mode 100644
index 0000000..efc3dc8
--- /dev/null
+++ b/.config/starship.toml
@@ -0,0 +1,54 @@
+format = """
+⋮ \
+$username\
+$hostname\
+$shlvl\
+$kubernetes\
+$directory\
+$git_branch\
+$git_commit\
+$git_state\
+$memory_usage\
+$env_var\
+$custom\
+$cmd_duration\
+$jobs\
+$time\
+$status\
+$character\
+"""
+
+add_newline = false
+
+[character]
+success_symbol = "❯"
+
+[directory]
+truncation_length = 0
+truncate_to_repo = false
+style = "bright-green"
+
+[username]
+format = "[$user@]($style)"
+style_user = "dimmed"
+
+[hostname]
+format = "[$hostname]($style) "
+style = "dimmed"
+
+[git_branch]
+format = "[$symbol$branch]($style) "
+disabled = true
+
+[jobs]
+symbol = "∆"
+
+[cmd_duration]
+format = "[$duration]($style) "
+style = ""
+min_time = 60_000
+# disabled = true
+
+[shlvl]
+symbol = "☰"
+disabled = false