minimal: Make starship async

This commit is contained in:
Quentin Boyer 2024-09-04 21:30:55 +02:00
parent da3f00605f
commit bf740f9298
3 changed files with 33 additions and 1 deletions

17
flake.lock generated
View file

@ -150,6 +150,22 @@
"type": "github"
}
},
"fish-async-prompt": {
"flake": false,
"locked": {
"lastModified": 1707036484,
"narHash": "sha256-J7y3BjqwuEH4zDQe4cWylLn+Vn2Q5pv0XwOSPwhw/Z0=",
"owner": "acomagu",
"repo": "fish-async-prompt",
"rev": "316aa03c875b58e7c7f7d3bc9a78175aa47dbaa8",
"type": "github"
},
"original": {
"owner": "acomagu",
"repo": "fish-async-prompt",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -1483,6 +1499,7 @@
"comma": "comma",
"diagram.nvim": "diagram.nvim",
"fioul": "fioul",
"fish-async-prompt": "fish-async-prompt",
"flake-parts": "flake-parts_2",
"flake-root": "flake-root",
"glaurung": "glaurung",

View file

@ -79,6 +79,11 @@
};
fioul.url = "github:traxys/fioul";
fish-async-prompt = {
url = "github:acomagu/fish-async-prompt";
flake = false;
};
nixvim = {
url = "github:nix-community/nixvim";
#url = "/home/traxys/Documents/nixvim";

View file

@ -165,12 +165,13 @@
programs.starship = {
enable = true;
enableFishIntegration = true;
enableFishIntegration = false;
settings =
let
background = "#3e3e3e";
in
{
command_timeout = 3000;
add_newline = true;
format = lib.concatStrings [
@ -298,6 +299,13 @@
programs.fish = {
enable = true;
plugins = [
{
name = "fish-async-prompt";
src = inputs.fish-async-prompt;
}
];
functions = {
fish_greeting = ''
${pkgs.fortune}/bin/fortune \
@ -384,6 +392,8 @@
if status is-login
keychain --eval $SSH_KEYS_TO_AUTOLOAD | source
end
starship init fish | source
'';
shellAliases = {