mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-16 05:51:08 +01:00
hyprsunset: fixed evaluation when hyprland package is null
This commit is contained in:
parent
fc2fe0104d
commit
ea3fe2bd72
1 changed files with 22 additions and 20 deletions
|
|
@ -200,28 +200,30 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs (config.wayland.windowManager.hyprland.package != null) lib.mapAttrs' (
|
// lib.optionalAttrs (config.wayland.windowManager.hyprland.package != null) (
|
||||||
name: transitionCfg:
|
lib.mapAttrs' (
|
||||||
lib.nameValuePair "hyprsunset-${name}" {
|
name: transitionCfg:
|
||||||
Install = { };
|
lib.nameValuePair "hyprsunset-${name}" {
|
||||||
|
Install = { };
|
||||||
|
|
||||||
Unit = {
|
Unit = {
|
||||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||||
Description = "hyprsunset transition for ${name}";
|
Description = "hyprsunset transition for ${name}";
|
||||||
After = [ "hyprsunset.service" ];
|
After = [ "hyprsunset.service" ];
|
||||||
Requires = [ "hyprsunset.service" ];
|
Requires = [ "hyprsunset.service" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
# Execute multiple requests sequentially
|
# Execute multiple requests sequentially
|
||||||
ExecStart = lib.concatMapStringsSep " && " (
|
ExecStart = lib.concatMapStringsSep " && " (
|
||||||
cmd:
|
cmd:
|
||||||
"${lib.getExe' config.wayland.windowManager.hyprland.package "hyprctl"} hyprsunset ${lib.escapeShellArgs cmd}"
|
"${lib.getExe' config.wayland.windowManager.hyprland.package "hyprctl"} hyprsunset ${lib.escapeShellArgs cmd}"
|
||||||
) transitionCfg.requests;
|
) transitionCfg.requests;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
) cfg.transitions;
|
) cfg.transitions
|
||||||
|
);
|
||||||
|
|
||||||
timers = lib.mapAttrs' (
|
timers = lib.mapAttrs' (
|
||||||
name: transitionCfg:
|
name: transitionCfg:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue