{lib, ...}: {
home-manager.users.buffet = {
programs.foot = {
enable = true;
server.enable = true;
settings = let
colors = import ./colors.nix;
dehash = lib.attrsets.mapAttrs (_: lib.strings.removePrefix "#");
primary = dehash colors.primary;
normal = dehash colors.normal;
bright = dehash colors.bright;
in {
main = {
term = "xterm-256color";
font = "APL386 Unicode:weight=bold:size=8";
pad = "12x8";
};
scrollback.lines = 10000;
url = {
launch = ''firefox ''${url}'';
key-bindings = {
show-urls-launch = "Control+Shift+l";
colors = {
inherit (primary) foreground background;
regular0 = normal.black;
regular1 = normal.red;
regular2 = normal.green;
regular3 = normal.yellow;
regular4 = normal.blue;
regular5 = normal.magenta;
regular6 = normal.cyan;
regular7 = normal.white;
bright0 = bright.black;
bright1 = bright.red;
bright2 = bright.green;
bright3 = bright.yellow;
bright4 = bright.blue;
bright5 = bright.magenta;
bright6 = bright.cyan;
bright7 = bright.white;
}