add starship
This commit is contained in:
commit
97aa03c739
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit immediately if a command exits with a non-zero status.
|
||||
set -e
|
||||
|
||||
# Function to install Fish shell
|
||||
install_fish() {
|
||||
echo "Installing Fish shell..."
|
||||
sudo apt update
|
||||
sudo apt install -y fish
|
||||
}
|
||||
|
||||
# Function to set Fish as the default shell
|
||||
set_default_fish() {
|
||||
echo "Setting Fish as the default shell..."
|
||||
chsh -s $(which fish)
|
||||
}
|
||||
|
||||
# Function to install Starship
|
||||
install_starship() {
|
||||
echo "Installing Starship..."
|
||||
curl -sS https://starship.rs/install.sh | sh -s -- -y
|
||||
}
|
||||
|
||||
# Function to configure Starship for Fish
|
||||
configure_starship() {
|
||||
echo "Configuring Starship for Fish..."
|
||||
mkdir -p ~/.config/fish
|
||||
echo 'starship init fish | source' >> ~/.config/fish/config.fish
|
||||
}
|
||||
|
||||
# Function to overwrite starship.toml
|
||||
overwrite_starship_toml() {
|
||||
if [ -f "./starship.toml" ]; then
|
||||
echo "Overwriting starship.toml..."
|
||||
mkdir -p ~/.config/starship
|
||||
cp ./terminal/starship.toml ~/.config/starship/starship.toml
|
||||
else
|
||||
echo "starship.toml not found in the repository."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Main script execution
|
||||
install_fish
|
||||
set_default_fish
|
||||
install_starship
|
||||
configure_starship
|
||||
overwrite_starship_toml
|
||||
|
||||
echo "Fish shell and Starship prompt setup complete!"
|
|
@ -0,0 +1,174 @@
|
|||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
format = """
|
||||
[](color_purple)\
|
||||
$hostname\
|
||||
[](bg:color_orange fg:color_purple)\
|
||||
$os\
|
||||
$username\
|
||||
[](bg:color_yellow fg:color_orange)\
|
||||
$directory\
|
||||
[](fg:color_yellow bg:color_aqua)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](fg:color_aqua bg:color_blue)\
|
||||
$c\
|
||||
$rust\
|
||||
$golang\
|
||||
$nodejs\
|
||||
$php\
|
||||
$java\
|
||||
$kotlin\
|
||||
$haskell\
|
||||
$python\
|
||||
[](fg:color_blue bg:color_bg3)\
|
||||
$docker_context\
|
||||
$conda\
|
||||
[](fg:color_bg3 bg:color_bg1)\
|
||||
$time\
|
||||
[ ](fg:color_bg1)\
|
||||
$line_break$character"""
|
||||
|
||||
palette = 'gruvbox_dark'
|
||||
|
||||
[palettes.gruvbox_dark]
|
||||
color_fg0 = '#fbf1c7'
|
||||
color_bg1 = '#3c3836'
|
||||
color_bg3 = '#665c54'
|
||||
color_blue = '#458588'
|
||||
color_aqua = '#689d6a'
|
||||
color_green = '#98971a'
|
||||
color_orange = '#d65d0e'
|
||||
color_purple = '#b16286'
|
||||
color_red = '#cc241d'
|
||||
color_yellow = '#d79921'
|
||||
|
||||
[hostname]
|
||||
style = "bg:color_purple fg:color_fg0"
|
||||
format = "[ $hostname ]($style)"
|
||||
ssh_only = false
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
style = "bg:color_orange fg:color_fg0"
|
||||
|
||||
[os.symbols]
|
||||
Windows = ""
|
||||
Ubuntu = ""
|
||||
SUSE = ""
|
||||
Raspbian = ""
|
||||
Mint = ""
|
||||
Macos = ""
|
||||
Manjaro = ""
|
||||
Linux = ""
|
||||
Gentoo = ""
|
||||
Fedora = ""
|
||||
Alpine = ""
|
||||
Amazon = ""
|
||||
Android = ""
|
||||
Arch = ""
|
||||
Artix = ""
|
||||
CentOS = ""
|
||||
Debian = ""
|
||||
Redhat = ""
|
||||
RedHatEnterprise = ""
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
style_user = "bg:color_orange fg:color_fg0"
|
||||
style_root = "bg:color_orange fg:color_fg0"
|
||||
format = '[ $user ]($style)'
|
||||
|
||||
[directory]
|
||||
style = "fg:color_fg0 bg:color_yellow"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
"Developer" = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
||||
style = "bg:color_aqua"
|
||||
format = '[[ $symbol $branch ](fg:color_fg0 bg:color_aqua)]($style)'
|
||||
|
||||
[git_status]
|
||||
style = "bg:color_aqua"
|
||||
format = '[[($all_status$ahead_behind )](fg:color_fg0 bg:color_aqua)]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[golang]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[php]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[kotlin]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[haskell]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[python]
|
||||
symbol = ""
|
||||
style = "bg:color_blue"
|
||||
format = '[[ $symbol( $version) ](fg:color_fg0 bg:color_blue)]($style)'
|
||||
|
||||
[docker_context]
|
||||
symbol = ""
|
||||
style = "bg:color_bg3"
|
||||
format = '[[ $symbol( $context) ](fg:#83a598 bg:color_bg3)]($style)'
|
||||
|
||||
[conda]
|
||||
style = "bg:color_bg3"
|
||||
format = '[[ $symbol( $environment) ](fg:#83a598 bg:color_bg3)]($style)'
|
||||
|
||||
[time]
|
||||
disabled = false
|
||||
time_format = "%R"
|
||||
style = "bg:color_bg1"
|
||||
format = '[[ $time ](fg:color_fg0 bg:color_bg1)]($style)'
|
||||
|
||||
[line_break]
|
||||
disabled = false
|
||||
|
||||
[character]
|
||||
disabled = false
|
||||
success_symbol = '[](bold fg:color_green)'
|
||||
error_symbol = '[](bold fg:color_red)'
|
||||
vimcmd_symbol = '[](bold fg:color_green)'
|
||||
vimcmd_replace_one_symbol = '[](bold fg:color_purple)'
|
||||
vimcmd_replace_symbol = '[](bold fg:color_purple)'
|
||||
vimcmd_visual_symbol = '[](bold fg:color_yellow)'
|
Loading…
Reference in New Issue