refactor: Update starship.toml file path and add optional icon parameter in setup.sh

This commit is contained in:
Bram Kelchtermans 2024-06-27 22:16:25 +02:00
parent ef396d6c1a
commit 20996128e5
2 changed files with 9 additions and 1 deletions

View File

@ -34,7 +34,14 @@ overwrite_starship_toml() {
if [ -f "./terminal/starship.toml" ]; then
echo "Overwriting starship.toml..."
mkdir -p ~/.config/starship
cp ./terminal/starship.toml ~/.config/starship.toml
cp ./terminal/starship.toml ~/.config/starship/starship.toml
# Check if icon parameter is provided
if [ ! -z "$icon" ]; then
echo "Adding icon [$icon](bg:color_purple fg:color_white) to starship.toml..."
sed -i "5i\icon = \"$icon\"" ~/.config/starship/starship.toml
fi
else
echo "starship.toml not found in the repository."
exit 1

View File

@ -32,6 +32,7 @@ $line_break$character"""
palette = 'gruvbox_dark'
[palettes.gruvbox_dark]
color_white = '#ffffff'
color_fg0 = '#fbf1c7'
color_bg1 = '#3c3836'
color_bg3 = '#665c54'