This commit is contained in:
albert 2024-02-18 20:33:13 +09:00
parent ca62f0de0b
commit da0a6c5573
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A

View file

@ -1,63 +1,65 @@
{ config, lib, ... }: { config, lib, ... }:
let let
gitColor = "#${config.lib.stylix.colors.base08}"; usernameColor = "#${config.lib.stylix.colors.base07}";
hostnameColor = "#${config.lib.stylix.colors.base0A}"; directoryColor = "#${config.lib.stylix.colors.base06}";
dirColor = "#${config.lib.stylix.colors.base0C}"; statusolor = "#${config.lib.stylix.colors.base05}";
timeColor = "#${config.lib.stylix.colors.base00}"; errorColor = "#${config.lib.stylix.colors.base04}";
redColor = "#${config.lib.stylix.colors.base09}"; fgColor = "#${config.lib.stylix.colors.base02}";
blackColor = "#${config.lib.stylix.colors.base00}";
whiteColor = "#${config.lib.stylix.colors.base07}";
in in
{ {
programs.starship = { programs.starship = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
settings = { settings = {
format = lib.concatStrings [ format = lib.concatStrings [
"$os" "[](${usernameColor})"
"» "
"$username" "$username"
"$hostname" "$hostname"
" »" "[](bg:${directoryColor} fg:${usernameColor})"
"$directory" "$directory"
" »" "[](fg:${directoryColor} bg:${statusolor})"
"$git_branch" "$git_branch"
"$git_status" "$git_status"
"$rust" "$rust"
"$docker_context" "$docker_context"
"$nix_shell" "$nix_shell"
"[](fg:${statusolor} bg:${errorColor})"
"$status" "$status"
"[ ](fg:${errorColor})"
]; ];
username = { username = {
show_always = true; show_always = true;
style_user = "fg:${hostnameColor}"; style_user = "fg:${whiteColor} bg:${usernameColor}";
style_root = "fg:${hostnameColor}"; style_root = "fg:${whiteColor} bg:${usernameColor}";
format = "[$user]($style)"; format = "[$user]($style)";
disabled = false; disabled = false;
}; };
hostname = { hostname = {
ssh_only = true; ssh_only = true;
style = "fg:${hostnameColor}"; style = "fg:${fgColor} bg:${usernameColor}";
format = "[@$hostname]($style)"; format = "[@$hostname]($style)";
disabled = false; disabled = false;
}; };
os = { os = {
style = "fg:${hostnameColor}"; style = "bg:${usernameColor}";
disabled = false; disabled = true;
}; };
nix_shell = { nix_shell = {
disabled = true; disabled = false;
heuristic = true; heuristic = true;
symbol = " "; symbol = " ";
format = "[$symbol$state(\($name\))]($style)"; format = "[$symbol]($style)";
style = "fg:${gitColor}"; style = "fg:${fgColor} bg:${statusolor}";
}; };
directory = { directory = {
style = "fg:${dirColor}"; style = "fg:${fgColor} bg:${directoryColor}";
format = "[ $path ]($style)"; format = "[ $path ]($style)";
truncation_length = 3; truncation_length = 3;
truncation_symbol = "/"; truncation_symbol = "/";
@ -71,27 +73,28 @@ in
git_branch = { git_branch = {
symbol = ""; symbol = "";
style = "fg:${gitColor}"; style = "fg:${fgColor} bg:${statusolor}";
format = "[ $symbol $branch ]($style)"; format = "[ $symbol $branch ]($style)";
}; };
git_status = { git_status = {
style = "fg:${gitColor}"; style = "fg:${fgColor} bg:${statusolor}";
format = "[$all_status$ahead_behind]($style)"; format = "[$all_status$ahead_behind ]($style)";
}; };
status = { status = {
style = "fg:${redColor}"; style = "fg:${fgColor} bg:${errorColor}";
format = "[$status ]($style) » "; format = "[$status ]($style)";
disabled = false; disabled = false;
}; };
time = { time = {
disabled = false; disabled = false;
time_format = "%R"; # Hour:Minute Format time_format = "%R"; # Hour:Minute Format
style = "fg:${timeColor}"; style = "fg:${fgColor} bg:${blackColor}";
format = "[ $time]($style)"; format = "[ $time]($style)";
}; };
}; };
}; };
} }