only show jj repo status, not git

This commit is contained in:
Khaïs COLIN 2025-10-16 12:46:51 +02:00
parent a364ac7be3
commit 9f9350fe0b
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
3 changed files with 132 additions and 23 deletions

115
flake.lock generated
View file

@ -187,6 +187,28 @@
"type": "github" "type": "github"
} }
}, },
"fenix": {
"inputs": {
"nixpkgs": [
"starship-jj",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1755412999,
"narHash": "sha256-qD+X0KuAp0iiqElrlouXM43fmW7VCg7fGQzr6oal318=",
"owner": "nix-community",
"repo": "fenix",
"rev": "fe8535d8c9afe780d5344d28db7fe1de3df736a0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"firefox-gnome-theme": { "firefox-gnome-theme": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -394,6 +416,27 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_6": {
"inputs": {
"systems": [
"starship-jj",
"systems"
]
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": { "fromYaml": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -804,6 +847,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": {
"locked": {
"lastModified": 1755186698,
"narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixvim": { "nixvim": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
@ -977,9 +1036,27 @@
"optnix": "optnix", "optnix": "optnix",
"other-transcode": "other-transcode", "other-transcode": "other-transcode",
"river-shifttags": "river-shifttags", "river-shifttags": "river-shifttags",
"starship-jj": "starship-jj",
"stylix": "stylix" "stylix": "stylix"
} }
}, },
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1755004716,
"narHash": "sha256-TbhPR5Fqw5LjAeI3/FOPhNNFQCF3cieKCJWWupeZmiA=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "b2a58b8c6eff3c3a2c8b5c70dbf69ead78284194",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -1002,6 +1079,27 @@
"type": "github" "type": "github"
} }
}, },
"starship-jj": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils_6",
"nixpkgs": "nixpkgs_8",
"systems": "systems_5"
},
"locked": {
"lastModified": 1757479801,
"narHash": "sha256-HTkDZQJnlbv2LlBybpBTNh1Y3/M8RNeQuiked3JaLgI=",
"owner": "lanastara_foss",
"repo": "starship-jj",
"rev": "04557921210b770faefb9ea7ee60152d61b03755",
"type": "gitlab"
},
"original": {
"owner": "lanastara_foss",
"repo": "starship-jj",
"type": "gitlab"
}
},
"stylix": { "stylix": {
"inputs": { "inputs": {
"base16": "base16", "base16": "base16",
@ -1015,7 +1113,7 @@
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur",
"systems": "systems_5", "systems": "systems_6",
"tinted-foot": "tinted-foot", "tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty", "tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes", "tinted-schemes": "tinted-schemes",
@ -1112,6 +1210,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": { "tinted-foot": {
"flake": false, "flake": false,
"locked": { "locked": {

View file

@ -47,6 +47,8 @@
copyparty.url = "github:9001/copyparty"; copyparty.url = "github:9001/copyparty";
optnix.url = "github:water-sucks/optnix"; optnix.url = "github:water-sucks/optnix";
starship-jj.url = "gitlab:lanastara_foss/starship-jj";
}; };
outputs = { outputs = {
nixpkgs, nixpkgs,
@ -59,9 +61,9 @@
other-transcode, other-transcode,
nix-doom-emacs-unstraightened, nix-doom-emacs-unstraightened,
cassowary, cassowary,
mms,
copyparty, copyparty,
optnix, optnix,
starship-jj,
... ...
}: let }: let
system = "x86_64-linux"; system = "x86_64-linux";
@ -74,6 +76,7 @@
nix-doom-emacs-unstraightened = nix-doom-emacs-unstraightened.hmModule; nix-doom-emacs-unstraightened = nix-doom-emacs-unstraightened.hmModule;
cassowary = cassowary.packages.${system}.default; cassowary = cassowary.packages.${system}.default;
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
starship-jj = starship-jj.packages.${system}.default;
}; };
in { in {
nixosConfigurations.void = nixpkgs.lib.nixosSystem { nixosConfigurations.void = nixpkgs.lib.nixosSystem {

View file

@ -8,6 +8,7 @@
kitty-unstable, kitty-unstable,
nix-doom-emacs-unstraightened, nix-doom-emacs-unstraightened,
cassowary, cassowary,
starship-jj,
... ...
}: let }: let
username = "khais"; username = "khais";
@ -39,6 +40,8 @@ in {
fd fd
file file
rclone rclone
# jj info in shell prompt
starship-jj
# used for yazi epub previews # used for yazi epub previews
epub-thumbnailer epub-thumbnailer
# remote working # remote working
@ -498,31 +501,21 @@ in {
settings = { settings = {
# short prompt timeout # short prompt timeout
command_timeout = 30; command_timeout = 30;
# custom.jj = {
# command = ''
# jj log -r@ -n1 --ignore-working-copy --no-graph --color always -T '
# separate(" ",
# bookmarks.map(|x| truncate_end(10, x.name(), "…")).join(" "),
# tags.map(|x| truncate_end(10, x.name(), "…")).join(" "),
# surround("\"", "\"", truncate_end(24, description.first_line(), "…")),
# if(conflict, "conflict"),
# if(divergent, "divergent"),
# if(hidden, "hidden"), )
# '
# '';
# when = "jj root --ignore-working-copy";
# symbol = "jj";
# };
# custom.jjstate = {
# command = ''
# jj log -r@ -n1 --ignore-working-copy --no-graph --stat | tail -n1 | ${pkgs.sd}/bin/sd "(\d+) files? changed, (\d+) insertions?\(\+\), (\d+) deletions?\(-\)" ' ''${1}m ''${2}+ ''${3}-' | ${pkgs.sd}/bin/sd " 0." ""
# '';
# when = "jj root";
# };
git_state.disabled = true; git_state.disabled = true;
git_status.disabled = true;
git_commit.disabled = true; git_commit.disabled = true;
git_metrics.disabled = true; git_metrics.disabled = true;
git_branch.disabled = true; git_branch.disabled = true;
custom.jj = {
command = "prompt";
format = "$output";
ignore_timeout = true;
shell = ["starship-jj" "--ignore-working-copy" "starship"];
use_stdin = false;
when = true;
};
}; };
}; };