2023-04-04 00:35:30 +00:00
|
|
|
|
{ config, pkgs, lib, ... }: {
|
2022-05-06 13:29:25 +00:00
|
|
|
|
|
|
|
|
|
home-manager.users.${config.user}.programs.starship = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = {
|
|
|
|
|
add_newline = false; # Don't print new line at the start of the prompt
|
|
|
|
|
format = lib.concatStrings [
|
|
|
|
|
"$directory"
|
|
|
|
|
"$git_branch"
|
|
|
|
|
"$git_commit"
|
|
|
|
|
"$git_status"
|
2022-10-01 18:24:06 +00:00
|
|
|
|
"$hostname"
|
2022-05-06 13:29:25 +00:00
|
|
|
|
"$cmd_duration"
|
|
|
|
|
"$character"
|
|
|
|
|
];
|
2022-08-18 03:16:35 +00:00
|
|
|
|
right_format = "$nix_shell";
|
2022-05-06 13:29:25 +00:00
|
|
|
|
character = {
|
|
|
|
|
success_symbol = "[❯](bold green)";
|
|
|
|
|
error_symbol = "[❯](bold red)";
|
|
|
|
|
vicmd_symbol = "[❮](bold green)";
|
|
|
|
|
};
|
|
|
|
|
cmd_duration = {
|
|
|
|
|
min_time = 5000;
|
2023-04-04 00:35:30 +00:00
|
|
|
|
show_notifications = if pkgs.stdenv.isLinux then false else true;
|
2022-05-06 13:29:25 +00:00
|
|
|
|
min_time_to_notify = 30000;
|
|
|
|
|
format = "[$duration]($style) ";
|
|
|
|
|
};
|
|
|
|
|
directory = {
|
|
|
|
|
truncate_to_repo = true;
|
|
|
|
|
truncation_length = 100;
|
|
|
|
|
};
|
|
|
|
|
git_branch = { format = "[$symbol$branch]($style)"; };
|
|
|
|
|
git_commit = {
|
|
|
|
|
format = "( @ [$hash]($style) )";
|
|
|
|
|
only_detached = false;
|
|
|
|
|
};
|
|
|
|
|
git_status = {
|
|
|
|
|
format = "([$all_status$ahead_behind]($style) )";
|
|
|
|
|
conflicted = "=";
|
|
|
|
|
ahead = "⇡";
|
|
|
|
|
behind = "⇣";
|
|
|
|
|
diverged = "⇕";
|
|
|
|
|
untracked = "⋄";
|
|
|
|
|
stashed = "⩮";
|
|
|
|
|
modified = "∽";
|
|
|
|
|
staged = "+";
|
|
|
|
|
renamed = "»";
|
|
|
|
|
deleted = "✘";
|
|
|
|
|
style = "red";
|
|
|
|
|
};
|
2022-10-01 18:24:06 +00:00
|
|
|
|
hostname = {
|
|
|
|
|
ssh_only = true;
|
|
|
|
|
format = "on [$hostname](bold red) ";
|
|
|
|
|
};
|
2022-08-18 03:16:35 +00:00
|
|
|
|
nix_shell = {
|
2022-08-20 01:09:42 +00:00
|
|
|
|
format = "[$symbol $name]($style)";
|
2022-08-18 03:16:35 +00:00
|
|
|
|
symbol = "❄️";
|
|
|
|
|
};
|
2022-06-21 03:34:24 +00:00
|
|
|
|
python = { format = "[\${version}\\(\${virtualenv}\\)]($style)"; };
|
2022-05-06 13:29:25 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|