Something went wrong. Try again.
My nixos configuration
Something went wrong. Try again.
2.0 kB · 71 lines
TOML
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172# from the official wiki: https://github.com/jj-vcs/jj/wiki/Starship
# custom module for jj status[custom.jj]description = "The current jj status"when = "jj --ignore-working-copy root"symbol = "🥋 "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"), )''''
# optionally disable git modules when JJ is found.# note that you'll need to add ${custom.git_branch}, ${custom.git_commit} etc# into format: https://starship.rs/config/#default-prompt-format[git_status]disabled = true
[custom.git_status]when = "! jj --ignore-working-copy root" # Slow without `require_repo = true`require_repo = true # Avoids `when` eval overhead in plain dirscommand = "starship module git_status"style = "" # This disables the default "(bold green)" styledescription = "Only show git_status if we're not in a jj repo"
[git_commit]disabled = true
[custom.git_commit]when = "! jj --ignore-working-copy root"require_repo = truecommand = "starship module git_commit"style = ""description = "Only show git_commit if we're not in a jj repo"
[git_metrics]disabled = true
[custom.git_metrics]when = "! jj --ignore-working-copy root"require_repo = truecommand = "starship module git_metrics"description = "Only show git_metrics if we're not in a jj repo"style = ""
[git_branch]disabled = true
[custom.git_branch]when = "! jj --ignore-working-copy root"require_repo = truecommand = "starship module git_branch"description = "Only show git_branch if we're not in a jj repo"style = ""