foot: use mkTarget
This commit is contained in:
parent
910dc0dc3e
commit
89edd2f3c0
1 changed files with 29 additions and 18 deletions
|
|
@ -1,20 +1,31 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
options.stylix.targets.foot.enable =
|
||||
config.lib.stylix.mkEnableTarget "Foot" true;
|
||||
{ mkTarget, ... }:
|
||||
mkTarget {
|
||||
name = "foot";
|
||||
humanName = "Foot";
|
||||
|
||||
config.programs.foot.settings = lib.mkIf config.stylix.targets.foot.enable {
|
||||
main = {
|
||||
include = toString (
|
||||
config.lib.stylix.colors {
|
||||
templateRepo = config.stylix.inputs.tinted-foot;
|
||||
}
|
||||
);
|
||||
font =
|
||||
with config.stylix.fonts;
|
||||
"${monospace.name}:size=${toString sizes.terminal}";
|
||||
dpi-aware = "no";
|
||||
};
|
||||
colors.alpha = config.stylix.opacity.terminal;
|
||||
};
|
||||
configElements = [
|
||||
(
|
||||
{ fonts }:
|
||||
{
|
||||
programs.foot.settings.main = {
|
||||
font = "${fonts.monospace.name}:=size=${toString fonts.sizes.terminal}";
|
||||
dpi-aware = "no";
|
||||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
{ opacity }:
|
||||
{
|
||||
programs.foot.settings.colors.alpha = opacity.terminal;
|
||||
}
|
||||
)
|
||||
(
|
||||
{ colors, inputs }:
|
||||
{
|
||||
programs.foot.settings.main.include = toString (colors {
|
||||
templateRepo = inputs.tinted-foot;
|
||||
});
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue