feat: improve starship
This commit is contained in:
1 parent
939ec4fdf6
commit
2a0f4f6851
1 file changed
+30
-38
+30
-38
@@ -4,58 +4,50 @@
|
|||||||
add_newline = false
|
add_newline = false
|
||||||
|
|
||||||
format = """
|
format = """
|
||||||
$nix_shell\
|
|
||||||
$directory\
|
$directory\
|
||||||
${custom.git}\
|
$git_branch\
|
||||||
${custom.jj}\
|
$git_status\
|
||||||
$cmd_duration\
|
|
||||||
$line_break\
|
$line_break\
|
||||||
$character"""
|
$character"""
|
||||||
|
|
||||||
|
right_format = """
|
||||||
|
$nix_shell\
|
||||||
|
$mise\
|
||||||
|
$python\
|
||||||
|
$cmd_duration"""
|
||||||
|
|
||||||
[character]
|
[character]
|
||||||
success_symbol = "❯(yellow)"
|
success_symbol = "❯(yellow)"
|
||||||
error_symbol = "❯(yellow)"
|
error_symbol = "❯(yellow)"
|
||||||
|
|
||||||
[git_status]
|
[git_status]
|
||||||
disabled = true
|
disabled = false
|
||||||
|
|
||||||
[git_branch]
|
[git_branch]
|
||||||
disabled = true
|
disabled = false
|
||||||
|
|
||||||
[custom.git]
|
|
||||||
when = "jj root >/dev/null 2>&1 && exit 1 || git rev-parse --is-inside-work-tree >/dev/null 2>&1"
|
|
||||||
command = "starship module git_branch && starship module git_status"
|
|
||||||
shell = ["sh", "--norc", "--noprofile"]
|
|
||||||
style = "bold purple"
|
|
||||||
|
|
||||||
[custom.jj]
|
|
||||||
description = "The current jj status"
|
|
||||||
when = "jj root >/dev/null 2>&1"
|
|
||||||
symbol = " "
|
symbol = " "
|
||||||
style = "bold blue"
|
style = "bold purple"
|
||||||
shell = ["sh", "--norc", "--noprofile"]
|
|
||||||
command = '''
|
|
||||||
jj log --revisions @ --no-graph --ignore-working-copy --color always --limit 1 --template '
|
|
||||||
separate(" ",
|
|
||||||
change_id.shortest(4),
|
|
||||||
bookmarks,
|
|
||||||
"|",
|
|
||||||
concat(
|
|
||||||
if(conflict, "💥"),
|
|
||||||
if(divergent, "🚧"),
|
|
||||||
if(hidden, "👻"),
|
|
||||||
if(immutable, "🔒"),
|
|
||||||
),
|
|
||||||
raw_escape_sequence("\x1b[1;32m") ++ if(empty, "(empty)"),
|
|
||||||
raw_escape_sequence("\x1b[1;32m") ++ coalesce(
|
|
||||||
truncate_end(29, description.first_line(), "…"),
|
|
||||||
"(no description set)",
|
|
||||||
) ++ raw_escape_sequence("\x1b[0m"),
|
|
||||||
)
|
|
||||||
'
|
|
||||||
'''
|
|
||||||
|
|
||||||
[directory]
|
[directory]
|
||||||
truncation_length = 4
|
truncation_length = 4
|
||||||
style = "bold cyan"
|
style = "bold cyan"
|
||||||
|
|
||||||
|
[cmd_duration]
|
||||||
|
min_time = 2000
|
||||||
|
format = "[ $duration]($style)"
|
||||||
|
style = "bold yellow"
|
||||||
|
|
||||||
|
[nix_shell]
|
||||||
|
symbol = " "
|
||||||
|
format = "[$symbol$state( \\($name\\))]($style) "
|
||||||
|
|
||||||
|
[mise]
|
||||||
|
symbol = " "
|
||||||
|
format = "[$symbol$env_tools]($style) "
|
||||||
|
|
||||||
|
[python]
|
||||||
|
symbol = " "
|
||||||
|
format = "[$symbol$version (\\($virtualenv\\))]($style) "
|
||||||
|
detect_extensions = []
|
||||||
|
detect_files = []
|
||||||
|
detect_folders = []
|
||||||
Reference in new issue
Block a user