From b71ae393a33652bd717c792c3fa947fa76546015 Mon Sep 17 00:00:00 2001 From: gwbeip Date: Mon, 28 Apr 2025 20:42:10 +0800 Subject: [PATCH] modify --- starship/starship.toml | 13 ++++++++----- zsh/config_starship.sh | 2 +- zsh/install_ohmyzsh.sh | 6 ++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/starship/starship.toml b/starship/starship.toml index 0571c1a..19ca0fa 100644 --- a/starship/starship.toml +++ b/starship/starship.toml @@ -44,6 +44,7 @@ color_orange = '#d65d0e' color_purple = '#b16286' color_red = '#cc241d' color_yellow = '#d79921' +color_ssh = '#292929' [os] @@ -82,14 +83,16 @@ format = '[ $user ]($style)' [hostname] style = "bg:color_orange fg:color_fg0" ssh_only = false -ssh_symbol = "🌐" -format = '[@$hostname$ssh_symbol ]($style)' +# ssh_symbol = "" +# ssh_symbol = "" +ssh_symbol = " 󰬚󰬚󰬏" +format = '[@$hostname]($style)[ $ssh_symbol ](bg:color_orange fg:color_ssh)' aliases = { "DESKTOP-GD7R6G4" = "Main", "DESKTOP-NDHG1UL" = "LabPC" } [directory] style = "fg:color_fg0 bg:color_yellow" format = "[ $path ]($style)" -truncation_length = 3 +truncation_length = 4 truncation_symbol = "…/" [directory.substitutions] @@ -178,8 +181,8 @@ format = '[[  $duration ](fg:color_fg0 bg:color_bg1)]($style)' [line_break] disabled = false -# [character] -# disabled = false +[character] +disabled = false # success_symbol = '[](bold fg:color_green)' # error_symbol = '[](bold fg:color_red)' # vimcmd_symbol = '[](bold fg:color_green)' diff --git a/zsh/config_starship.sh b/zsh/config_starship.sh index 16b40c0..af0d7bd 100644 --- a/zsh/config_starship.sh +++ b/zsh/config_starship.sh @@ -3,7 +3,7 @@ current_dir=$(dirname $(realpath "$0")) 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 [[ $(readlink "$starship_config_file") != $(realpath "$current_dir/../starship/starship.toml") ]]; then ln -sf "$current_dir/../starship/starship.toml" "$starship_config_file" diff --git a/zsh/install_ohmyzsh.sh b/zsh/install_ohmyzsh.sh index 356a577..a670436 100644 --- a/zsh/install_ohmyzsh.sh +++ b/zsh/install_ohmyzsh.sh @@ -23,8 +23,10 @@ if ! command -v zoxide >/dev/null 2>&1; then fi if ! command -v python >/dev/null 2>&1; then - echo "Python is not installed." - exit 1 + if ! command -v python3 >/dev/null 2>&1; then + echo "Python is not installed." + exit 1 + fi fi if ! command -v starship >/dev/null 2>&1; then