Files
illogical-impulse/modules/terminal/terminal.nix
T
2025-08-13 08:59:27 -05:00

71 lines
1.7 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
config,
lib,
...
}: let
cfg = config.programs.illogical-impulse;
in {
imports = [
../options.nix
];
config = lib.mkIf cfg.enable {
programs.starship = lib.mkIf cfg.settings.simpleStarship.enable {
enable = true;
settings = {
format = lib.concatStrings [
"$username"
"$hostname"
"$directory"
"$git_branch"
"$git_state"
"$git_status"
"$cmd_duration"
"$line_break"
"$python"
"$character"
];
directory = {
style = "blue";
};
character = {
success_symbol = "[](purple)";
error_symbol = "[](red)";
vimcmd_symbol = "[](green)";
};
git_branch = {
format = "[$branch]($style)";
style = "bright-black";
};
git_status = {
format = "[(*$conflicted$untracked$modified$staged$renamed$deleted) $ahead_behind$stashed]($style)";
style = "cyan";
conflicted = "";
untracked = "";
modified = "";
staged = "";
renamed = "";
deleted = "";
stashed = "";
};
git_state = {
format = "([$state( $progress_current/$progress_total)]($style)) ";
style = "bright-black";
};
cmd_duration = {
format = "[$duration]($style) ";
style = "yellow";
};
python = {
format = "[$virtualenv]($style) ";
style = "bright-black";
};
};
};
home.file.".config/starship.toml" = lib.mkIf (!cfg.settings.simpleStarship.enable) {
source = builtins.path {path = ../../.config/starship.toml;};
};
};
}