218 lines
6.2 KiB
Nix
218 lines
6.2 KiB
Nix
{
|
||
pkgs,
|
||
config,
|
||
lib,
|
||
...
|
||
}:
|
||
with lib;
|
||
let
|
||
cfg = config.eboskma.programs.starship;
|
||
in
|
||
{
|
||
options.eboskma.programs.starship = {
|
||
enable = mkEnableOption "starship";
|
||
};
|
||
|
||
config = mkIf cfg.enable {
|
||
programs.starship = {
|
||
enable = true;
|
||
settings = {
|
||
# Sets user-defined palette
|
||
palette = "catppuccin_macchiato";
|
||
|
||
character = {
|
||
# Note the use of Catppuccin color 'maroon'
|
||
success_symbol = "[[♥](green) ❯](maroon)";
|
||
error_symbol = "[❯](red)";
|
||
vimcmd_symbol = "[❮](green)";
|
||
};
|
||
directory = {
|
||
truncation_length = 4;
|
||
read_only = " "; # Icon: lock
|
||
# Catppuccin 'lavender'
|
||
style = "bold lavender";
|
||
};
|
||
username = {
|
||
format = "[$user]($style) on ";
|
||
style_user = "bold #bd93f9";
|
||
};
|
||
status = {
|
||
disabled = false;
|
||
format = "[$symbol $status]($style) ";
|
||
};
|
||
|
||
cmd_duration.style = "bold #f1fa8c";
|
||
|
||
aws.disabled = true;
|
||
buf.symbol = " ";
|
||
c.symbol = " ";
|
||
conda.symbol = " ";
|
||
crystal.symbol = " ";
|
||
dart.symbol = " ";
|
||
docker_context.symbol = " ";
|
||
elixir.symbol = " ";
|
||
elm.symbol = " ";
|
||
fennel.symbol = " ";
|
||
fossil_branch.symbol = " ";
|
||
git_branch = {
|
||
symbol = " ";
|
||
style = "bold #ff79c6";
|
||
};
|
||
git_status = {
|
||
style = "bold #ff5555";
|
||
};
|
||
golang.symbol = " ";
|
||
guix_shell.symbol = " ";
|
||
haskell.symbol = " ";
|
||
haxe.symbol = " ";
|
||
hg_branch.symbol = " ";
|
||
hostname = {
|
||
ssh_symbol = " ";
|
||
style = "bold #ff5555";
|
||
};
|
||
java.symbol = " ";
|
||
julia.symbol = " ";
|
||
kotlin.symbol = " ";
|
||
lua.symbol = " ";
|
||
memory_usage = {
|
||
symbol = " "; # Icon: memory
|
||
disabled = false;
|
||
};
|
||
meson.symbol = " ";
|
||
nim.symbol = " ";
|
||
nix_shell.symbol = " ";
|
||
nodejs.symbol = " ";
|
||
ocaml.symbol = " ";
|
||
os.symbols = {
|
||
Alpaquita = " ";
|
||
Alpine = " ";
|
||
AlmaLinux = " ";
|
||
Amazon = " ";
|
||
Android = " ";
|
||
Arch = " ";
|
||
Artix = " ";
|
||
CentOS = " ";
|
||
Debian = " ";
|
||
DragonFly = " ";
|
||
Emscripten = " ";
|
||
EndeavourOS = " ";
|
||
Fedora = " ";
|
||
FreeBSD = " ";
|
||
Garuda = " ";
|
||
Gentoo = " ";
|
||
HardenedBSD = " ";
|
||
Illumos = " ";
|
||
Kali = " ";
|
||
Linux = " ";
|
||
Mabox = " ";
|
||
Macos = " ";
|
||
Manjaro = " ";
|
||
Mariner = " ";
|
||
MidnightBSD = " ";
|
||
Mint = " ";
|
||
NetBSD = " ";
|
||
NixOS = " ";
|
||
OpenBSD = " ";
|
||
openSUSE = " ";
|
||
OracleLinux = " ";
|
||
Pop = " ";
|
||
Raspbian = " ";
|
||
Redhat = " ";
|
||
RedHatEnterprise = " ";
|
||
RockyLinux = " ";
|
||
Redox = " ";
|
||
Solus = " ";
|
||
SUSE = " ";
|
||
Ubuntu = " ";
|
||
Unknown = " ";
|
||
Void = " ";
|
||
Windows = " ";
|
||
};
|
||
package.symbol = " "; # Icon: package_variant_closed
|
||
perl.symbol = " ";
|
||
php.symbol = " ";
|
||
pijul_channel.symbol = " ";
|
||
python.symbol = " ";
|
||
rlang.symbol = " ";
|
||
ruby.symbol = " ";
|
||
rust.symbol = " ";
|
||
scala.symbol = " ";
|
||
swift.symbol = " ";
|
||
time.disabled = false;
|
||
zig.symbol = " ";
|
||
|
||
custom = {
|
||
jj = {
|
||
command = ''
|
||
jj log -r@ -n1 --ignore-working-copy --no-graph --color always -T '
|
||
separate(" ",
|
||
bookmarks.map(|x| if(
|
||
x.name().substr(0, 10).starts_with(x.name()),
|
||
x.name().substr(0, 10),
|
||
x.name().substr(0, 9) ++ "…")
|
||
).join(" "),
|
||
tags.map(|x| if(
|
||
x.name().substr(0, 10).starts_with(x.name()),
|
||
x.name().substr(0, 10),
|
||
x.name().substr(0, 9) ++ "…")
|
||
).join(" "),
|
||
surround("\"","\"",
|
||
if(
|
||
description.first_line().substr(0, 24).starts_with(description.first_line()),
|
||
description.first_line().substr(0, 24),
|
||
description.first_line().substr(0, 23) ++ "…"
|
||
)
|
||
),
|
||
if(conflict, "conflict"),
|
||
if(divergent, "divergent"),
|
||
if(hidden, "hidden"),
|
||
)
|
||
'
|
||
'';
|
||
when = "jj root";
|
||
symbol = "jj";
|
||
};
|
||
|
||
jjstate = {
|
||
when = "jj root";
|
||
command = ''
|
||
jj log -r@ -n1 --no-graph -T "" --stat | tail -n1 | ${lib.getExe pkgs.sd} "(\d+) files? changed, (\d+) insertions?\(\+\), (\d+) deletions?\(-\)" ' ''${1}m ''${2}+ ''${3}-' | ${lib.getExe pkgs.sd} " 0." ""
|
||
'';
|
||
|
||
};
|
||
};
|
||
|
||
palettes = {
|
||
catppuccin_macchiato = {
|
||
rosewater = "#f5e0dc";
|
||
flamingo = "#f2cdcd";
|
||
pink = "#f5c2e7";
|
||
mauve = "#cba6f7";
|
||
red = "#f38ba8";
|
||
maroon = "#eba0ac";
|
||
peach = "#fab387";
|
||
yellow = "#f9e2af";
|
||
green = "#a6e3a1";
|
||
teal = "#94e2d5";
|
||
sky = "#89dceb";
|
||
sapphire = "#74c7ec";
|
||
blue = "#89b4fa";
|
||
lavender = "#b4befe";
|
||
text = "#cdd6f4";
|
||
subtext1 = "#bac2de";
|
||
subtext0 = "#a6adc8";
|
||
overlay2 = "#9399b2";
|
||
overlay1 = "#7f849c";
|
||
overlay0 = "#6c7086";
|
||
surface2 = "#585b70";
|
||
surface1 = "#45475a";
|
||
surface0 = "#313244";
|
||
base = "#1e1e2e";
|
||
mantle = "#181825";
|
||
crust = "#11111b";
|
||
};
|
||
};
|
||
};
|
||
};
|
||
};
|
||
}
|