add starship

This commit is contained in:
2026-03-28 12:04:13 +01:00
parent 02691d4e42
commit 04353161a4
7 changed files with 385 additions and 8 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
[ -f "$HOME/.local/snippets/apply-color-helper" ] || {
echo "Missing helper script: $HOME/.local/snippets/apply-color-helper"
exit 1
}
. "$HOME/.local/snippets/apply-color-helper"
file="$path"/../starship.toml
sed -i \
-e "s/^palette\s*=.*/palette = '${palette}'/" \
-e "/^\[palettes\.${palette}\]/,/^\[/{s/^accent\s*=.*/accent = \"#${colorHex}\"/}" \
"$file"
if [ $? -ne 0 ]; then
log_error "Failed to edit ${file}"
exit 1
fi
log_success "starship"
@@ -9,4 +9,6 @@ end
# oh-my-posh
if test -f $HOME/.config/posh_theme.omp.json; and type -q oh-my-posh
eval (oh-my-posh init fish --config $HOME/.config/posh_theme.omp.json)
else if type -q starship
eval (starship init fish)
end