This commit is contained in:
2025-04-28 20:42:10 +08:00
parent 851dfaa7d2
commit b71ae393a3
3 changed files with 13 additions and 8 deletions

View File

@@ -44,6 +44,7 @@ color_orange = '#d65d0e'
color_purple = '#b16286' color_purple = '#b16286'
color_red = '#cc241d' color_red = '#cc241d'
color_yellow = '#d79921' color_yellow = '#d79921'
color_ssh = '#292929'
[os] [os]
@@ -82,14 +83,16 @@ format = '[ $user ]($style)'
[hostname] [hostname]
style = "bg:color_orange fg:color_fg0" style = "bg:color_orange fg:color_fg0"
ssh_only = false ssh_only = false
ssh_symbol = "🌐" # ssh_symbol = ""
format = '[@$hostname$ssh_symbol ]($style)' # ssh_symbol = ""
ssh_symbol = " 󰬚󰬚󰬏"
format = '[@$hostname]($style)[ $ssh_symbol ](bg:color_orange fg:color_ssh)'
aliases = { "DESKTOP-GD7R6G4" = "Main", "DESKTOP-NDHG1UL" = "LabPC" } aliases = { "DESKTOP-GD7R6G4" = "Main", "DESKTOP-NDHG1UL" = "LabPC" }
[directory] [directory]
style = "fg:color_fg0 bg:color_yellow" style = "fg:color_fg0 bg:color_yellow"
format = "[ $path ]($style)" format = "[ $path ]($style)"
truncation_length = 3 truncation_length = 4
truncation_symbol = "…/" truncation_symbol = "…/"
[directory.substitutions] [directory.substitutions]
@@ -178,8 +181,8 @@ format = '[[  $duration ](fg:color_fg0 bg:color_bg1)]($style)'
[line_break] [line_break]
disabled = false disabled = false
# [character] [character]
# disabled = false disabled = false
# success_symbol = '[](bold fg:color_green)' # success_symbol = '[](bold fg:color_green)'
# error_symbol = '[](bold fg:color_red)' # error_symbol = '[](bold fg:color_red)'
# vimcmd_symbol = '[](bold fg:color_green)' # vimcmd_symbol = '[](bold fg:color_green)'

View File

@@ -3,7 +3,7 @@
current_dir=$(dirname $(realpath "$0")) current_dir=$(dirname $(realpath "$0"))
starship_config_file="$HOME/.config/starship.toml" starship_config_file="$HOME/.config/starship.toml"
if [[ $(file $starship_config_file) ]]; then if [ -f $starship_config_file ]; then
if $(file "$starship_config_file" | grep -q "symbolic link") ; then if $(file "$starship_config_file" | grep -q "symbolic link") ; then
if [[ $(readlink "$starship_config_file") != $(realpath "$current_dir/../starship/starship.toml") ]]; then if [[ $(readlink "$starship_config_file") != $(realpath "$current_dir/../starship/starship.toml") ]]; then
ln -sf "$current_dir/../starship/starship.toml" "$starship_config_file" ln -sf "$current_dir/../starship/starship.toml" "$starship_config_file"

View File

@@ -23,9 +23,11 @@ if ! command -v zoxide >/dev/null 2>&1; then
fi fi
if ! command -v python >/dev/null 2>&1; then if ! command -v python >/dev/null 2>&1; then
if ! command -v python3 >/dev/null 2>&1; then
echo "Python is not installed." echo "Python is not installed."
exit 1 exit 1
fi fi
fi
if ! command -v starship >/dev/null 2>&1; then if ! command -v starship >/dev/null 2>&1; then
echo "Starship is not installed." echo "Starship is not installed."