dotfiles

Linux and macOS dotfiles
git clone https://github.com/michaelneuper/dotfiles.git
README | Files | Log | Refs

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 = "ïŻŁ "