-
-
Save ryo-ARAKI/48a11585299f9032fa4bda60c9bba593 to your computer and use it in GitHub Desktop.
# ~/.config/starship.toml | |
[battery] | |
full_symbol = "🔋" | |
charging_symbol = "🔌" | |
discharging_symbol = "⚡" | |
[[battery.display]] | |
threshold = 30 | |
style = "bold red" | |
[character] | |
error_symbol = "[✖](bold red) " | |
[cmd_duration] | |
min_time = 10_000 # Show command duration over 10,000 milliseconds (=10 sec) | |
format = " took [$duration]($style)" | |
[directory] | |
truncation_length = 5 | |
format = "[$path]($style)[$lock_symbol]($lock_style)" | |
[git_branch] | |
format = " [$symbol$branch]($style) " | |
symbol = "🍣 " | |
style = "bold yellow" | |
[git_commit] | |
commit_hash_length = 8 | |
style = "bold white" | |
[git_state] | |
format = '[\($state( $progress_current of $progress_total)\)]($style) ' | |
[git_status] | |
conflicted = "⚔️ " | |
ahead = "🏎️ 💨 ×${count} " | |
behind = "🐢 ×${count} " | |
diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count} " | |
untracked = "🛤️ ×${count} " | |
stashed = "📦 " | |
modified = "📝 ×${count} " | |
staged = "🗃️ ×${count} " | |
renamed = "📛 ×${count} " | |
deleted = "🗑️ ×${count} " | |
style = "bright-white" | |
format = "$all_status$ahead_behind" | |
[hostname] | |
ssh_only = false | |
format = "<[$hostname]($style)>" | |
trim_at = "-" | |
style = "bold dimmed white" | |
disabled = true | |
[julia] | |
format = "[$symbol$version]($style) " | |
symbol = "ஃ " | |
style = "bold green" | |
[memory_usage] | |
format = "$symbol[${ram}( | ${swap})]($style) " | |
threshold = 70 | |
style = "bold dimmed white" | |
disabled = false | |
[package] | |
disabled = true | |
[python] | |
format = "[$symbol$version]($style) " | |
style = "bold green" | |
[rust] | |
format = "[$symbol$version]($style) " | |
style = "bold green" | |
[time] | |
time_format = "%T" | |
format = "🕙 $time($style) " | |
style = "bright-white" | |
disabled = false | |
[typst] | |
format = "[$symbol($version)]($style)" | |
style = "bold #239dae" | |
[username] | |
style_user = "bold dimmed blue" | |
show_always = false | |
[nodejs] | |
format = "via [🤖 $version](bold green) " |
You have to put the "submodules" in double third brackets @Kjvthomas
# This is the one you have
[battery]
full_symbol = "battery"
charging_symbol = "electric_plug"
discharging_symbol = "zap"
[battery.display]
threshold = 30
style = "bold red"
# This is the one it should be :
[[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10%
threshold = 10
style = "bold red"
You have to put the "submodules" in double third brackets @Kjvthomas
# This is the one you have [battery] full_symbol = "battery" charging_symbol = "electric_plug" discharging_symbol = "zap" [battery.display] threshold = 30 style = "bold red"
# This is the one it should be : [[battery.display]] # "bold red" style and discharging_symbol when capacity is between 0% and 10% threshold = 10 style = "bold red"
Yeah I know I was trying different things to get the [character] area to work. That’s the area that’s broken
So @Kjvthomas does it work now?
So @Kjvthomas does it work now?
Same error. The lack of brackets were never the problem. I did remove them to see if that was the issue and it wasn’t.
Well, @Kjvthomas I think you should print your full-config file here, I am unable to determine the problem until I see what's wrong, thank you
Well, @Kjvthomas I think you should print your full-config file here, I am unable to determine the problem until I see what's wrong, thank you
Thanks for your help, Here it is:
Don't print a new line at the start of the prompt
add_newline = false
Make prompt a single line instead of two lines
[line_break]
disabled = true
Replace the "❯" symbol in the prompt with "➜"
[character] # The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)" # The "success_symbol" is set to "➜" with color "bold green"
Use custom format
format = """
[┌───────────────────>](bold green)
[│](bold green)$directory$rust$package
[└─>](bold green) """
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "⚡"
[[battery.display]]
threshold = 30
style = "bold red"
#[character]
#error_symbol = "[✖](bold red)"
[cmd_duration]
min_time = 10_000 # Show command duration over 10,000 milliseconds (=10 sec)
format = " took $duration"
[directory]
truncation_length = 5
format = "$path$lock_symbol "
[git_branch]
format = " $symbol$branch "
symbol = "🍣 "
style = "bold yellow"
[git_commit]
commit_hash_length = 8
style = "bold white"
[git_state]
format = '($state( $progress_current of $progress_total)) '
[git_status]
conflicted = "⚔️ "
ahead = "🏎️ 💨 ×${count}"
behind = "🐢 ×${count}"
diverged = "🔱 🏎️ 💨 ×${ahead_count} 🐢 ×${behind_count}"
untracked = "🛤️ ×${count}"
stashed = "📦 "
modified = "📝 ×${count}"
staged = "🗃️ ×${count}"
renamed = "📛 ×${count}"
deleted = "🗑️ ×${count}"
style = "bright-white"
format = "$all_status$ahead_behind"
[hostname]
ssh_only = false
format = "<$hostname>"
trim_at = "-"
style = "bold dimmed white"
disabled = true
[julia]
format = "$symbol$version "
symbol = "ஃ "
style = "bold green"
[memory_usage]
format = "$symbol${ram}( | ${swap}) "
threshold = 70
style = "bold dimmed white"
disabled = false
[package]
disabled = true
[python]
format = "$symbol$version "
style = "bold green"
[rust]
format = "$symbol$version "
style = "bold green"
[time]
time_format = "%a, %b %d, %Y | %I:%M%P ️"
format = "$time($style) "
style = "bright-white"
disabled = false
[username]
style_user = "bold dimmed blue"
show_always = false
Those comments weren't necessary, you could've just pasted the file within 3 backticks, that would've been better. So I suppose that everything is written as-is in ur message, but just without those comments?
Those comments weren't necessary, you could've just pasted the file within 3 backticks, that would've been better. So I suppose that everything is written as-is in ur message, but just without those comments?
Yeah…. I’m sorry about that. I literally pasted the config. I’m new to GitHub please pardon me
Ok no problem, just post it again without any modifications
Ok no problem, just post it again without any modifications
It’s literally the raw config posted above if that helps.
Try taking the error_symbol
part up to the [character]
module on line 7. Most likely the problem was because you put the [character]
module on 2 different places.
Try taking the
error_symbol
part up to the[character]
module on line 7. Most likely the problem was because you put the[character]
module on 2 different places.
fixed thanks!
I have copied the same config as here in my ~/.config/starship.toxl but my terminal (alacritty) is not redering few symbols / icons / emojis correctly there is small square box in there place which means the symbols were not rendered correctly as far as I know. So what font modules do I have to download for these to work correctly. Currently I have these fonts
Comfortaa-Regular.ttf FiraCode-Medium.ttf iosevka_nerd_font.ttf
Comfortaa-VariableFont_wght.ttf Fira_Code_Regular_Nerd_Font_Complete.ttf 'System San Francisco Display Bold.ttf'
Fantasque-Sans-Mono-Nerd-Font.ttf FiraCode-Regular.ttf 'System San Francisco Display Regular.ttf'
Feather.ttf FiraCode-Retina.ttf 'System San Francisco Display Thin.ttf'
FiraCode-Bold.ttf FiraCode-SemiBold.ttf 'System San Francisco Display Ultralight.ttf'```
in my ~/.local/share/fonts/
@HarshalRathore You should use a nerd font in your alacritty, you have to have a nerd font installed (seems like you already have) and then you have to use that nerd font in your alacritty config. By the way what do you mean by a "small square box"?
@nazibalalam
I meant this
How my alacritty looks
And how my kitty looks
@HarshalRathore AFAIK, alacritty does not have proper ligature support. Kitty does and thus it works as expected.
@HarshalRathore install the alacritty-ligatures
package and see if it's fixed.
Edit: Sorry for the long delay! 🙁
Is it possible to display the full path of the current working directory?
If you use $directory only the last directory name will be displayed.
Is it possible to display the full path of the current working directory? If you use $directory only the last directory name will be displayed.
You can add to the config file:
[directory]
truncation_length = 0
ayo anyone . i want my starship something like this what i put for that smiling face?
Just wanted to share my organized starship config here if anyone is interested
https://gist.github.com/deepanchal/415e78646aaf5e57e10490d01ad90109
How to change the region value of the prompt?
How to change the region value of the prompt?
From starship docs:
The aws module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the AWS_REGION, AWS_DEFAULT_REGION, and AWS_PROFILE env vars and the ~/.aws/config and ~/.aws/credentials files as required.
I have a default region set in my ~/.aws/config
# example config
[default]
sso_session = my-sso
sso_account_id = 111122223333
sso_role_name = readOnly
region = us-west-2 # <-- starship uses this
output = text
[profile user1]
sso_session = my-sso
sso_account_id = 444455556666
sso_role_name = readOnly
region = us-east-1
output = json
[sso-session my-sso]
sso_region = us-east-1
sso_start_url = https://my-sso-portal.awsapps.com/start
sso_registration_scopes = sso:account:access
Check this out for more details: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
@omaru-ok
ayo anyone . i want my starship something like this what i put for that smiling face?
Adding this to your starship config (~/.config/starship.toml
) should give you :)
/ :(
in your prompt.
[character]
success_symbol = '[:\)](green)' # The 'success_symbol' segment is being set to ':)' with the color 'green'
error_symbol = '[:\(](red)' # The 'error_symbol' segment is being set to ':(' with the color 'red'
damn
How to change the region value of the prompt?
From starship docs:
The aws module shows the current AWS region and profile and an expiration timer when using temporary credentials. The output of the module uses the AWS_REGION, AWS_DEFAULT_REGION, and AWS_PROFILE env vars and the ~/.aws/config and ~/.aws/credentials files as required.
I have a default region set in my
~/.aws/config
# example config [default] sso_session = my-sso sso_account_id = 111122223333 sso_role_name = readOnly region = us-west-2 # <-- starship uses this output = text [profile user1] sso_session = my-sso sso_account_id = 444455556666 sso_role_name = readOnly region = us-east-1 output = json [sso-session my-sso] sso_region = us-east-1 sso_start_url = https://my-sso-portal.awsapps.com/start sso_registration_scopes = sso:account:accessCheck this out for more details: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
Thank you.
Hi, how can i make it so that my directory shows like "Dashboard > resources" instead of "Dashboard/resources"? I am using the nerd-font-symbols preset. Also, as this is in VSCode, I want to show the full directory to "Dashboard". Putting the code in the config below does not work.
[directory]
truncation_length = 0
read_only = " "
Hi,
Thank you for sharing this, I'm pretty new to starship. I've moved from basic .zsh
terminal to starship.
I wanted to port my .zshrc
configuration to starship
, couldn't find proper documentation to follow.
Kind of looking for equivalents of doing aliases. For example:
## cat
alias bat='bat --theme=ansi-dark'
command -v bat > /dev/null && alias cat='bat --pager=never'
## du
command -v dust > /dev/null && alias du='dust'
## find
command -v fd > /dev/null && alias find='fd'
## fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
## git aliases and functions
source $HOME/.config/zsh/git.zsh
## history
source $HOME/.config/zsh/history.zsh
Thank you.
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = "⚡"
[battery.display]
threshold = 30
style = "bold red"
[character]
error_symbol = "[✖](bold red)"
my current error:
(starship::config): Unable to parse the config file: redefinition of table
character
for keycharacter
at line 28 column 1when i # the errorsymbol the error goes away
EDIT:
I have to do this to get the error to go away
#[character]
#error_symbol = "[✖](bold red)"
if i dont #[character] the error is still there