nix/graphical/terminal.nix
atagen 4921973b9a amaan can't into kernel
do 400 pushups per cache miss idiot
2026-04-27 16:09:39 +10:00

75 lines
1.7 KiB
Nix

{
pkgs,
lib,
config,
mkWrappers,
...
}:
let
inherit (mkWrappers pkgs) wrap;
font =
config.rice.fonts.monospace.name + ":size=" + (builtins.toString config.rice.fonts.monospace.size);
pal = config.rice.palette.shortHex;
footConfig = pkgs.writeText "foot.ini" ''
[main]
font=${font}
font-bold=${font}
font-italic=${font}
[bell]
system=yes
urgent=yes
notify=yes
visual=yes
[colors-dark]
background=${pal.util.bg}
foreground=${pal.util.fg}
regular0=${pal.normal.black}
regular1=${pal.normal.red}
regular2=${pal.normal.green}
regular3=${pal.normal.yellow}
regular4=${pal.normal.blue}
regular5=${pal.normal.magenta}
regular6=${pal.normal.cyan}
regular7=${pal.normal.white}
bright0=${pal.bright.black}
bright1=${pal.bright.red}
bright2=${pal.bright.green}
bright3=${pal.bright.yellow}
bright4=${pal.bright.blue}
bright5=${pal.bright.magenta}
bright6=${pal.bright.cyan}
bright7=${pal.bright.white}
selection-foreground=${pal.util.fg_sel}
selection-background=${pal.util.bg_sel}
[tabs]
enabled=yes
position=bottom
inherit-cwd=yes
style=gradient
label-padding=15
height=26
background=${pal.bright.black}
foreground=${pal.util.fg}
active-background=${pal.util.bg_sel}
active-foreground=${pal.util.fg_sel}
layout=floating
tab-width=180
tab-padding=10
margin=8
'';
footPatched = pkgs.foot.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./foot-tabs.patch ];
});
foot = wrap {
name = "foot";
pkg = footPatched;
args = [ "--config=${footConfig}" ];
};
in
scope "apps.terminal" foot