From 5a864a15248407072bcc0d99df2cdb783a438f3d Mon Sep 17 00:00:00 2001 From: inkch Date: Sun, 14 Jan 2024 23:27:42 +0900 Subject: [PATCH] starship: add starship config --- dot_config/starship.toml.tmpl | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 dot_config/starship.toml.tmpl diff --git a/dot_config/starship.toml.tmpl b/dot_config/starship.toml.tmpl new file mode 100644 index 0000000..6f2f24f --- /dev/null +++ b/dot_config/starship.toml.tmpl @@ -0,0 +1,69 @@ +# starship's config file. +# See > https://starship.rs/config +####################################### + +format = """ +$username\ +$hostname\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$custom\ +$cmd_duration\ +$line_break\ +$jobs\ +$status\ +$character""" + +# Print a new line at the start of the prompt +add_newline = true + + +[username] +format = "[$user]($style)" + +[hostname] +ssh_only = true +format = "@[$hostname](bold red) " +disabled = false + + +[character] +format = "$symbol " +{{- if eq .chezmoi.username "root" }} +success_symbol = "[#](bold green)" +error_symbol = "[#](bold red)" +{{- else }} +success_symbol = "[>](bold green)" +error_symbol = "[>](bold red)" +vicmd_symbol = "[<](bold green)" +{{- end }} + +[cmd_duration] +min_time = 500 +format = " [$duration](bold yellow)" +show_milliseconds = true + +[directory] +truncation_length = 8 +truncate_to_repo = false +truncation_symbol = "" +format = "[$path]($style)[$read_only]($read_only_style) " + +{{- if (or (eq .chezmoi.hostname "arch") (eq .chezmoi.hostname "buzz")) }} +[directory.substitutions] +"/mnt/" = " " +"~/dev/" = "" +{{- end }} + +[git_branch] +always_show_remote = true +format = "[$branch]($style)" + +[custom.fish_private] +command = "echo PRIVATE" # shows output of command +# detect_files = ["foo"] # can specify filters but wildcards are not supported +when = """ set -q FISH_IS_IN_PRIVATE """ +format = " [$output]($style)"