Last active
September 20, 2025 09:20
-
-
Save getsueineko/16b465a79971ba66f3da10c7dc58653a to your computer and use it in GitHub Desktop.
~/.config/starship.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/smithumble/starship-cockpit | |
| "$schema" = 'https://starship.rs/config-schema.json' | |
| add_newline = true | |
| command_timeout = 2000 | |
| format = """ | |
| $os\ | |
| $username\ | |
| $shell\ | |
| $directory\ | |
| $git_branch\ | |
| $git_commit\ | |
| $git_status\ | |
| $git_metrics\ | |
| $git_state\ | |
| $c\ | |
| $rust\ | |
| $golang\ | |
| $nodejs\ | |
| $php\ | |
| $java\ | |
| $kotlin\ | |
| $haskell\ | |
| $python\ | |
| $package\ | |
| $docker_context\ | |
| $kubernetes\ | |
| $container\ | |
| $jobs\ | |
| ${custom.memory_usage}\ | |
| ${custom.battery}\ | |
| ${custom.keyboard_layout}\ | |
| $status\ | |
| $cmd_duration\ | |
| $line_break\ | |
| $character\ | |
| """ | |
| palette = 'gruvbox_dark' | |
| [palettes.default] | |
| color_ok = 'bright-green' | |
| color_danger = 'bright-red' | |
| color_caution = 'bright-yellow' | |
| color_os = 'red' | |
| color_username = 'red' | |
| color_directory = 'yellow' | |
| color_git = 'cyan' | |
| color_git_added = 'bright-green' | |
| color_git_deleted = 'bright-red' | |
| color_env = 'blue' | |
| color_kubernetes = 'purple' | |
| color_docker = 'blue' | |
| color_shell = '' | |
| color_container = '' | |
| color_other = '' | |
| color_time = '' | |
| color_duration = '' | |
| color_vimcmd_ok = 'green' | |
| color_vimcmd_replace = 'purple' | |
| color_vimcmd_visual = 'yellow' | |
| [palettes.gruvbox_dark] | |
| color_ok = '#b8bb26' | |
| color_danger = '#fb4934' | |
| color_caution = '#d79921' | |
| color_os = '#d65d0e' | |
| color_username = '#d65d0e' | |
| color_directory = '#d79921' | |
| color_git = '#689d6a' | |
| color_git_added = '#b8bb26' | |
| color_git_deleted = '#fb4934' | |
| color_env = '#458588' | |
| color_kubernetes = '#b16286' | |
| color_docker = '#458588' | |
| color_shell = '#a89984' | |
| color_container = '#cc241d' | |
| color_other = '#d5c4a1' | |
| color_time = '#fbf1c7' | |
| color_duration = '#fbf1c7' | |
| color_vimcmd_ok = '#8ec07c' | |
| color_vimcmd_replace = '#b16286' | |
| color_vimcmd_visual = '#d79921' | |
| [palettes.gruvbox_light] | |
| color_ok = '#79740e' | |
| color_danger = '#9d0006' | |
| color_caution = '#d79921' | |
| color_os = '#d65d0e' | |
| color_username = '#d65d0e' | |
| color_directory = '#d79921' | |
| color_git = '#689d6a' | |
| color_git_added = '#79740e' | |
| color_git_deleted = '#9d0006' | |
| color_env = '#458588' | |
| color_kubernetes = '#b16286' | |
| color_docker = '#458588' | |
| color_shell = '#7c6f64' | |
| color_container = '#cc241d' | |
| color_other = '#504945' | |
| color_time = '#282828' | |
| color_duration = '#282828' | |
| color_vimcmd_ok = '#689d6a' | |
| color_vimcmd_replace = '#b16286' | |
| color_vimcmd_visual = '#d79921' | |
| [os] | |
| disabled = false | |
| style = "fg:color_os" | |
| format = '[$symbol]($style)' | |
| [os.symbols] | |
| Windows = "" | |
| Ubuntu = "" | |
| SUSE = "" | |
| Raspbian = "" | |
| Mint = "" | |
| Macos = "" | |
| Manjaro = "" | |
| Linux = "" | |
| Gentoo = "" | |
| Fedora = "" | |
| Alpine = "" | |
| Amazon = "" | |
| Android = "" | |
| Arch = "" | |
| Artix = "" | |
| EndeavourOS = "" | |
| CentOS = "" | |
| Debian = "" | |
| Redhat = "" | |
| RedHatEnterprise = "" | |
| Pop = "" | |
| [username] | |
| show_always = true | |
| style_user = "fg:color_username" | |
| style_root = "bold fg:color_danger" | |
| format = '[ $user ]($style)' | |
| [directory] | |
| style = "fg:color_directory" | |
| read_only_style = "fg:color_directory" | |
| repo_root_style = "bold fg:color_directory" | |
| format = "[ $path ]($style)" | |
| read_only = " " | |
| home_symbol = "~" | |
| truncation_symbol = "…/" | |
| truncation_length = 0 | |
| truncate_to_repo = true | |
| fish_style_pwd_dir_length = 0 | |
| use_logical_path = true | |
| [git_branch] | |
| symbol = "" | |
| style = "fg:color_git" | |
| format = '( [$symbol $branch]($style) )' | |
| only_attached = true | |
| ignore_branches = [] | |
| truncation_length = 25 | |
| truncation_symbol = "..." | |
| always_show_remote = false | |
| disabled = false | |
| [git_commit] | |
| style = "fg:color_git" | |
| format = "( [($tag)(@$hash)]($style) )" | |
| commit_hash_length = 7 | |
| only_detached = true | |
| tag_symbol = " " | |
| tag_disabled = false | |
| disabled = false | |
| [git_status] | |
| style = "fg:color_git" | |
| format = '([$ahead_behind]($style) )([$all_status]($style) )' | |
| stashed = "*${count}" | |
| ahead = "⇡${count}" | |
| behind = "⇣${count}" | |
| up_to_date = "" | |
| diverged = "⇡${ahead_count}⇣${behind_count}" | |
| conflicted = "=${count}" | |
| deleted = "×${count}" | |
| renamed = "»${count}" | |
| modified = "!${count}" | |
| staged = "+${count}" | |
| untracked = "?${count}" | |
| ignore_submodules = false | |
| disabled = false | |
| [git_metrics] | |
| format = '([([+$added]($added_style))([-$deleted]($deleted_style))](fg:color_git) )' | |
| added_style = "fg:color_git_added" | |
| deleted_style = "fg:color_git_deleted" | |
| only_nonzero_diffs = true | |
| disabled = false | |
| [git_state] | |
| style = "fg:color_danger" | |
| format = '([$state( $progress_current/$progress_total)]($style bold) )' | |
| rebase = "REBASING" | |
| merge = "MERGING" | |
| revert = "REVERTING" | |
| cherry_pick = "CHERRY-PICKING" | |
| bisect = "BISECTING" | |
| am = "AM" | |
| am_or_rebase = "AM/REBASE" | |
| disabled = false | |
| [nodejs] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [c] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [rust] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [golang] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [php] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [java] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [kotlin] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [haskell] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [python] | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)( $virtualenv)]($style) )' | |
| version_format = '${raw}' | |
| [package] | |
| disabled = false | |
| symbol = "" | |
| style = "fg:color_env" | |
| format = '( [$symbol( $version)]($style) )' | |
| [docker_context] | |
| symbol = "" | |
| style = "fg:color_docker" | |
| format = '( [$symbol( $context)]($style) )' | |
| [kubernetes] | |
| symbol = "" | |
| style = "fg:color_kubernetes" | |
| format = '( [($symbol( $cluster))]($style) )' | |
| disabled = false | |
| [shell] | |
| disabled = false | |
| format = '[ $indicator ]($style)' | |
| bash_indicator = "bash" | |
| fish_indicator = "fish" | |
| zsh_indicator = "zsh" | |
| powershell_indicator = "powershell" | |
| pwsh_indicator = "pwsh" | |
| ion_indicator = "ion" | |
| elvish_indicator = "elvish" | |
| tcsh_indicator = "tcsh" | |
| xonsh_indicator = "xonsh" | |
| cmd_indicator = "cmd" | |
| nu_indicator = "nu" | |
| unknown_indicator = "" | |
| style = "fg:color_shell" | |
| [container] | |
| style = "fg:color_container" | |
| format = '( [$symbol $name]($style) )' | |
| [jobs] | |
| symbol = "" | |
| style = "fg:color_other" | |
| format = '( [$symbol( $number)]($style) )' | |
| symbol_threshold = 1 | |
| number_threshold = 1 | |
| [custom.memory_usage] | |
| command = "starship module memory_usage" | |
| when = '[ "${STARSHIP_COCKPIT_MEMORY_USAGE_ENABLED:-false}" = "true" ]' | |
| shell = "sh" | |
| format = "( $output )" | |
| disabled = false | |
| [memory_usage] | |
| threshold = 0 | |
| symbol = "" | |
| style = "fg:color_other" | |
| format = '( [$symbol( ${ram})]($style) )' | |
| disabled = false | |
| [custom.battery] | |
| command = """ | |
| battery_info=$(starship module battery) | |
| if [ -n "$battery_info" ]; then | |
| percent=$(echo "$battery_info" | grep -o '[0-9]*%' | sed 's/%//') | |
| if [ "$percent" -le "${STARSHIP_COCKPIT_BATTERY_THRESHOLD:-0}" ]; then | |
| echo "$battery_info" | sed 's/%%/%/' | |
| fi | |
| fi | |
| """ | |
| when = '[ "${STARSHIP_COCKPIT_BATTERY_ENABLED:-false}" = "true" ]' | |
| shell = "sh" | |
| format = "( $output )" | |
| disabled = false | |
| [battery] | |
| full_symbol = "" | |
| charging_symbol = "" | |
| discharging_symbol = "" | |
| unknown_symbol = "" | |
| empty_symbol = "" | |
| format = '( [$symbol( $percentage)]($style) )' | |
| disabled = false | |
| [[battery.display]] | |
| threshold = 10 | |
| style = "bold fg:color_danger" | |
| [[battery.display]] | |
| threshold = 20 | |
| style = "fg:color_caution" | |
| [[battery.display]] | |
| threshold = 100 | |
| style = "fg:color_other" | |
| [time] | |
| disabled = false | |
| time_format = "%R" | |
| style = "fg:color_time" | |
| format = '( [ $time]($style) )' | |
| [cmd_duration] | |
| min_time = 2000 | |
| format = '( [ $duration]($style) )' | |
| style = 'fg:color_duration' | |
| show_milliseconds = false | |
| disabled = false | |
| [status] | |
| disabled = false | |
| format = '( [$symbol( $common_meaning)( $signal_name)]($style) )' | |
| map_symbol = true | |
| pipestatus = true | |
| symbol = '' | |
| success_symbol = '' | |
| not_executable_symbol = '' | |
| not_found_symbol = '' | |
| sigint_symbol = '' | |
| signal_symbol = '' | |
| style = 'bold fg:color_danger' | |
| recognize_signal_code = true | |
| [line_break] | |
| disabled = false | |
| [character] | |
| disabled = false | |
| success_symbol = '[❯](bold fg:color_ok)' | |
| error_symbol = '[❯](bold fg:color_danger)' | |
| vimcmd_symbol = '[❮](bold fg:color_vimcmd_ok)' | |
| vimcmd_replace_one_symbol = '[❮](bold fg:color_vimcmd_replace)' | |
| vimcmd_replace_symbol = '[❮](bold fg:color_vimcmd_replace)' | |
| vimcmd_visual_symbol = '[❮](bold fg:color_vimcmd_visual)' | |
| [custom.keyboard_layout] | |
| command = """ | |
| # Set env variables if you want to use layout aliases (in uppercase) | |
| # export STARSHIP_COCKPIT_KEYBOARD_LAYOUT_ABC=ENG | |
| # export STARSHIP_COCKPIT_KEYBOARD_LAYOUT_UKRAINIAN=UKR | |
| # | |
| # Implementations: | |
| # macOS | |
| if [ "$(uname -s)" = "Darwin" ]; then | |
| input_source=$(defaults read ~/Library/Preferences/com.apple.HIToolbox.plist AppleCurrentKeyboardLayoutInputSourceID) | |
| layout_id=$(echo "$input_source" | cut -d '.' -f4) | |
| layout=$(printenv "STARSHIP_COCKPIT_KEYBOARD_LAYOUT_$(echo "$layout_id" | tr '[:lower:]' '[:upper:]')") | |
| echo "$layout" || echo "$layout_id" | |
| fi | |
| """ | |
| symbol = "" | |
| style = "fg:color_other" | |
| format = '( [$symbol $output]($style) )' | |
| when = '[ "${STARSHIP_COCKPIT_KEYBOARD_LAYOUT_ENABLED:-false}" = "true" ]' | |
| shell = "sh" | |
| disabled = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment