This commit is contained in:
Tao Tien 2025-01-21 13:18:55 -08:00
parent 37b1bde546
commit b0d2058ed5
4 changed files with 59 additions and 7 deletions

View file

@ -6,6 +6,7 @@
...
}: {
users.users.tao.packages = with pkgs; [
usbutils
freecad-wayland
piper
mousai

View file

@ -6,13 +6,12 @@ $username\
[](bg:color_yellow fg:color_orange)\
$directory\
[](fg:color_yellow bg:color_aqua)\
$jj\
$git_branch\
$git_status\
[](fg:color_aqua bg:color_blue)\
$c\
$rust\
$golang\
$nodejs\
$java\
$kotlin\
$python\
[](fg:color_blue bg:color_bg3)\
$docker_context\
@ -117,4 +116,54 @@ vimcmd_replace_symbol = '[](bold fg:color_purple)'
vimcmd_visual_symbol = '[](bold fg:color_yellow)'
[[battery.display]]
thershold = 42
threshold = 42
# custom module for jj status
[custom.jj]
ignore_timeout = true
description = "current jj status"
symbol = ""
when = true
command = '''
jj root > /dev/null && 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") ++ if(description.first_line().len() == 0,
"(no description set)",
if(description.first_line().substr(0, 29) == description.first_line(),
description.first_line(),
description.first_line().substr(0, 29) ++ "…",
)
) ++ raw_escape_sequence("\x1b[0m"),
)
'
'''
# disable git modules
[git_state]
disabled = true
[git_commit]
disabled = true
[git_metrics]
disabled = true
[git_branch]
disabled = true
# re-enable git_branch as long as we're not in a jj repo
[custom.git_branch]
when = true
command = "jj root >/dev/null 2>&1 || starship module git_branch"
description = "Only show git_branch if we're not in a jj repo"