{ lib, config, namespace, ... }: let inherit (lib) mkIf enabled mkForce concatStrings ; inherit (lib.${namespace}) mkEnableModule; cfg = config.${namespace}.programs.starship; inherit (config.${namespace}) theme; in { options = mkEnableModule "programs.starship"; imports = [ ./nerd-font-symbols.nix ]; config = mkIf cfg.enable { programs.starship = { enable = true; "${theme.colors.base}" = 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"; }; }; }; }