Optionalize mkTarget's 'humanName' and 'name' arguments by inferring 'humanName' from the 'name' attribute in the /modules/<MODULE>/meta.nix file, and 'name' from the /modules/<NAME>/ directory name. Inferring the 'humanName' and 'name' arguments ensures consistency and reduces boilerplate. The 'humanName' and 'name' arguments are optionalized instead of removed because complex modules generating target derivations need to distinguish between them. Closes: https://github.com/nix-community/stylix/issues/1661
49 lines
972 B
Nix
49 lines
972 B
Nix
{ mkTarget, ... }:
|
|
mkTarget {
|
|
config = [
|
|
(
|
|
{ fonts }:
|
|
{
|
|
programs.wofi.style = ''
|
|
window {
|
|
font-family: "${fonts.monospace.name}";
|
|
font-size: ${toString fonts.sizes.popups}pt;
|
|
}
|
|
'';
|
|
}
|
|
)
|
|
(
|
|
{ colors }:
|
|
{
|
|
programs.wofi.style = with colors.withHashtag; ''
|
|
window {
|
|
background-color: ${base00};
|
|
color: ${base05};
|
|
}
|
|
|
|
#entry:nth-child(odd) {
|
|
background-color: ${base00};
|
|
}
|
|
|
|
#entry:nth-child(even) {
|
|
background-color: ${base01};
|
|
}
|
|
|
|
#entry:selected {
|
|
background-color: ${base02};
|
|
}
|
|
|
|
#input {
|
|
background-color: ${base01};
|
|
color: ${base04};
|
|
border-color: ${base02};
|
|
}
|
|
|
|
#input:focus {
|
|
border-color: ${base0A};
|
|
}
|
|
'';
|
|
}
|
|
)
|
|
];
|
|
}
|