From 20996128e50521c7d60e66283cb359ccb55e3460 Mon Sep 17 00:00:00 2001 From: Bram Kelchtermans Date: Thu, 27 Jun 2024 22:16:25 +0200 Subject: [PATCH] refactor: Update starship.toml file path and add optional icon parameter in setup.sh --- setup.sh | 9 ++++++++- terminal/starship.toml | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 8e816c4e..fa034bea 100644 --- a/setup.sh +++ b/setup.sh @@ -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 diff --git a/terminal/starship.toml b/terminal/starship.toml index c5d6143c..1cec7f66 100644 --- a/terminal/starship.toml +++ b/terminal/starship.toml @@ -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'