commit 438d56293158cc3bfb36b1455d564f010115e548 parent 239f7b8b18f3283754e7a2f02ba8dc61dc6765ca Author: Michael Neuper <michael@michaelneuper.com> Date: Sat, 2 Aug 2025 15:00:16 +0200 customise starshpi prompt Diffstat:
| M | .config/starship.toml | | | 172 | ++++++++++++++++++++++++------------------------------------------------------- |
1 file changed, 51 insertions(+), 121 deletions(-)
diff --git a/.config/starship.toml b/.config/starship.toml @@ -1,32 +1,55 @@ -# __ __ _ _ -#| \/ | \ | | -#| \ / | \| | Michael Neuper -#| |\/| | . ` | https://michaelneuper.com -#| | | | |\ | https://github.com/michaelneuper -#|_| |_|_| \_| -# -## LEFT format = """ - [[$directory$git_branch$git_state]($style)](yellow)$git_status - $character """ - -## RIGHT -right_format = """ -$cmd_duration $time""" +[[$directory${custom.giturl}$git_branch$git_state]($style)](yellow)$git_status +$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' [directory] -style = "bold white" +# style = "bold violet" truncation_length = 0 truncate_to_repo = true repo_root_format = "[$before_root_path]($style)[$repo_root]($repo_root_style)[$path]($style)[$read_only]($read_only_style) " -truncation_symbol = "repo: " -read_only = "đ" +read_only = "ïŁ" read_only_style = "red" +[custom.giturl] +# disabled = true +style = "white" +description = "Display symbol for remote Git server" +command = """ +GIT_REMOTE=$(command git ls-remote --get-url 2> /dev/null) +if [[ "$GIT_REMOTE" =~ "github" ]]; then + GIT_REMOTE_SYMBOL="ï " +elif [[ "$GIT_REMOTE" =~ "gitlab" ]]; then + GIT_REMOTE_SYMBOL="ï " +elif [[ "$GIT_REMOTE" =~ "bitbucket" ]]; then + GIT_REMOTE_SYMBOL="ï ± " +elif [[ "$GIT_REMOTE" =~ "git" ]]; then + GIT_REMOTE_SYMBOL="ï" +else + GIT_REMOTE_SYMBOL="ï " +fi +echo "$GIT_REMOTE_SYMBOL " +""" + +when = 'git rev-parse --is-inside-work-tree 2> /dev/null' +format = "at $output" + [git_status] -style = "" +style = "bold" ahead = "[îȘ ${count}](green)" -# diverged = "ââĄ${ahead_count}âŁ${behind_count}" behind = "[îȘ${count}](red)" up_to_date = "" deleted = "[ï ](red)" @@ -36,115 +59,22 @@ stashed = "" modified = "[ï ](yellow)" staged = "" renamed = "[ï ](purple)" -format = ' ([$conflicted$deleted$renamed$modified$staged$untracked$ahead_behind]($style))' +format = ' [($all_status$ahead_behind )]($style)' [git_branch] -format = "[\\[[[$symbol](bold grey)$branch$tag](green)\\]]($style)" -symbol = "â " -style = "purple" - -[cmd_duration] -min_time = 1 -show_milliseconds = false -format = "[$duration]($style)" -disabled = false +# symbol = "[î¶](color_bg1)ï " +# style = "fg:color_fg0 bg:color_bg1" +# format = ' on [$symbol$branch]($style)[îŽ](color_bg1)' +symbol = "ï " +format = " on [$symbol$branch]($style)" [character] # Tells whether last command was successful or not -success_symbol = " [âŻ](bold blue)" -error_symbol = " [âŻ](bold red)" -vicmd_symbol = "[ âź](bold purple)" - -[time] -style = "bold grey" -format = "ï \\[$time\\]" -utc_time_offset = "local" -disabled = false - -# Somethere at the beginning -[battery] -full_symbol = "ïž " -charging_symbol = "ï " -discharging_symbol = "ï " -disabled = true +success_symbol = "[âŻ](bold green)" +error_symbol = "[âŻ](bold red)" +vicmd_symbol = "[âź](bold purple)" -[[battery.display]] # "bold red" style when capacity is between 0% and 10% -threshold = 15 -style = "bold red" -disabled = true - -[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% -threshold = 50 -style = "bold yellow" -disabled = true - -[[battery.display]] # "bold green" style when capacity is between 10% and 30% -threshold = 80 -style = "bold green" -disabled = true - -# SYMBOLS [status] symbol = "x" format = '[\[$symbol$status_common_meaning$status_signal_name$status_maybe_int\]]($style)' map_symbol = true disabled = false - -[aws] -symbol = "îœ " - -[conda] -symbol = "ï " - -[dart] -symbol = "î " - -[docker_context] -symbol = "ï " - -[elixir] -symbol = "î” " - -[elm] -symbol = "îŹ " - -[golang] -symbol = "î§ " - -[hg_branch] -symbol = "ï " - -[java] -symbol = "î " - -[julia] -symbol = "î€ " - -[nim] -symbol = "ï€ " - -[nix_shell] -symbol = "ï " - -[nodejs] -symbol = "î " - -[package] -symbol = "ïŁ " - -[perl] -symbol = "î© " - -[php] -symbol = "î " - -[python] -symbol = "î " - -[ruby] -symbol = "îŸ " - -[rust] -symbol = "îš " - -[swift] -symbol = "ïŻŁ "