diff --git a/config/starship.toml b/config/starship.toml new file mode 100644 index 00000000..f90b4268 --- /dev/null +++ b/config/starship.toml @@ -0,0 +1,17 @@ +add_newline = true +command_timeout = 200 +format = "[$directory$git_branch]($style)$character" + +[character] +error_symbol = "[✗](bold red)" +success_symbol = "[❯](bold #A5D6A7)[❯](bold #FFF59D)[❯](bold #FFAB91)" + +[directory] +truncation_length = 2 +truncation_symbol = "…/" +repo_root_style = "bold cyan" +repo_root_format = "[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) " + +[git_branch] +format = "[$branch]($style) " +style = "bold" diff --git a/default/bash/init b/default/bash/init index 7e1db9eb..149b16c5 100644 --- a/default/bash/init +++ b/default/bash/init @@ -2,6 +2,10 @@ if command -v mise &> /dev/null; then eval "$(mise activate bash)" fi +if command -v starship &> /dev/null; then + eval "$(starship init bash)" +fi + if command -v zoxide &> /dev/null; then eval "$(zoxide init bash)" fi diff --git a/install/development/terminal.sh b/install/development/terminal.sh index f90b005d..96068d92 100644 --- a/install/development/terminal.sh +++ b/install/development/terminal.sh @@ -4,5 +4,6 @@ yay -S --noconfirm --needed \ wget curl unzip inetutils impala \ fd eza fzf ripgrep zoxide bat dust jq xmlstarlet \ wl-clipboard fastfetch btop \ - man tldr less whois plocate bash-completion \ + man tldr less whois plocate \ + starship bash-completion \ alacritty diff --git a/migrations/1755436367.sh b/migrations/1755436367.sh new file mode 100644 index 00000000..cb89bf9a --- /dev/null +++ b/migrations/1755436367.sh @@ -0,0 +1,6 @@ +echo "Add minimal starship prompt to terminal" + +if command -v starship &>/dev/null; then + yay -S --noconfirm starship + cp $OMARCHY_PATH/config/starship.toml ~/.config/starship.toml +fi