81 lines
1.8 KiB
Nix
81 lines
1.8 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib)
|
|
mkIf
|
|
enabled
|
|
mkForce
|
|
concatStrings
|
|
;
|
|
inherit (lib.marleyos) mkEnableModule;
|
|
|
|
cfg = config.marleyos.programs.starship;
|
|
inherit (config.marleyos.theme) colors;
|
|
in
|
|
{
|
|
options = mkEnableModule "programs.starship";
|
|
|
|
imports = [
|
|
./nerd-font-symbols.nix
|
|
];
|
|
|
|
config = mkIf cfg.enable {
|
|
programs.starship = {
|
|
enable = true;
|
|
|
|
rose-pine = mkIf colors.isRosePine enabled;
|
|
|
|
settings = mkIf config.programs.starship.rose-pine.enabled {
|
|
format = mkForce (concatStrings [
|
|
"$username "
|
|
"$directory "
|
|
"$nix_shell "
|
|
"$git_branch "
|
|
"$git_status "
|
|
"$fill "
|
|
"$c "
|
|
"$elixir "
|
|
"$elm "
|
|
"$golang "
|
|
"$haskell "
|
|
"$java "
|
|
"$julia "
|
|
"$nodejs "
|
|
"$nim "
|
|
"$rust "
|
|
"$scala "
|
|
"$python "
|
|
"$time "
|
|
"$line_break "
|
|
"$character "
|
|
]);
|
|
|
|
character =
|
|
let
|
|
vim = "";
|
|
mkChar = sym: col: "[${sym}](fg:${col}) ";
|
|
in
|
|
{
|
|
success_symbol = mkChar "" "iris";
|
|
error_symbol = mkChar "" "love";
|
|
vimcmd_symbol = mkChar vim "rose";
|
|
vimcmd_replace_one_symbol = mkChar vim "gold";
|
|
vimcmd_replace_symbol = mkChar vim "gold";
|
|
vimcmd_visual_symbol = mkChar vim "iris";
|
|
};
|
|
|
|
nix_shell = {
|
|
format = "[](fg:overlay)[ $symbol $state( \($name\)) ]($style)[](fg:overlay) ";
|
|
style = "bg:overlay fg:foam";
|
|
};
|
|
|
|
git_branch.style = mkForce "bg:overlay fg:love";
|
|
git_status.style = mkForce "bg:overlay fg:rose";
|
|
time.style = mkForce "bg:overlay fg:gold";
|
|
};
|
|
};
|
|
};
|
|
}
|