refactor: Update starship.toml file path and add optional icon parameter in setup.sh
This commit is contained in:
parent
20996128e5
commit
5444d39615
4
setup.sh
4
setup.sh
|
@ -34,12 +34,12 @@ overwrite_starship_toml() {
|
||||||
if [ -f "./terminal/starship.toml" ]; then
|
if [ -f "./terminal/starship.toml" ]; then
|
||||||
echo "Overwriting starship.toml..."
|
echo "Overwriting starship.toml..."
|
||||||
mkdir -p ~/.config/starship
|
mkdir -p ~/.config/starship
|
||||||
cp ./terminal/starship.toml ~/.config/starship/starship.toml
|
cp ./terminal/starship.toml ~/.config/starship.toml
|
||||||
|
|
||||||
# Check if icon parameter is provided
|
# Check if icon parameter is provided
|
||||||
if [ ! -z "$icon" ]; then
|
if [ ! -z "$icon" ]; then
|
||||||
echo "Adding icon [$icon](bg:color_purple fg:color_white) to starship.toml..."
|
echo "Adding icon [$icon](bg:color_purple fg:color_white) to starship.toml..."
|
||||||
sed -i "5i\icon = \"$icon\"" ~/.config/starship/starship.toml
|
sed -i "5i\icon = \"$icon\"" ~/.config/starship.toml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue