hyprlock: use mkTraget
This commit is contained in:
parent
26efa4fca0
commit
81cb57a350
1 changed files with 36 additions and 22 deletions
|
|
@ -1,26 +1,40 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.stylix.targets.hyprlock;
|
||||
in
|
||||
{
|
||||
options.stylix.targets.hyprlock = with config.lib.stylix; {
|
||||
enable = mkEnableTarget "Hyprlock" true;
|
||||
useWallpaper = mkEnableWallpaper "Hyprlock" true;
|
||||
mkTarget,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
mkTarget {
|
||||
name = "hyprlock";
|
||||
humanName = "Hyprlock";
|
||||
|
||||
extraOptions = {
|
||||
useWallpaper = config.lib.stylix.mkEnableWallpaper "Hyprlock" true;
|
||||
};
|
||||
|
||||
config = lib.mkIf (config.stylix.enable && cfg.enable) {
|
||||
programs.hyprlock.settings = with config.lib.stylix.colors; {
|
||||
background = {
|
||||
color = "rgb(${base00})";
|
||||
path = lib.mkIf cfg.useWallpaper "${config.stylix.image}";
|
||||
};
|
||||
input-field = {
|
||||
outer_color = "rgb(${base03})";
|
||||
inner_color = "rgb(${base00})";
|
||||
font_color = "rgb(${base05})";
|
||||
fail_color = "rgb(${base08})";
|
||||
check_color = "rgb(${base0A})";
|
||||
};
|
||||
};
|
||||
};
|
||||
configElements = [
|
||||
(
|
||||
{ cfg, image }:
|
||||
{
|
||||
programs.hyprlock.settings.path = lib.mkIf cfg.useWallpaper "${image}";
|
||||
}
|
||||
)
|
||||
(
|
||||
{ colors }:
|
||||
{
|
||||
programs.hyprlock.settings = with colors; {
|
||||
background = {
|
||||
color = "rgb(${base00})";
|
||||
};
|
||||
input-field = {
|
||||
outer_color = "rgb(${base03})";
|
||||
inner_color = "rgb(${base00})";
|
||||
font_color = "rgb(${base05})";
|
||||
fail_color = "rgb(${base08})";
|
||||
check_color = "rgb(${base0A})";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue