mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 21:01:34 +01:00
Simplify wrapper imports
This commit is contained in:
parent
43c8adddb6
commit
42ebeaf86e
19 changed files with 298 additions and 248 deletions
|
|
@ -1,35 +1,39 @@
|
|||
{ assembleWrapper, moduleArgs, ... }:
|
||||
let
|
||||
inherit (moduleArgs) pkgs;
|
||||
in
|
||||
assembleWrapper {
|
||||
basePackage = pkgs.hypridle;
|
||||
flags =
|
||||
let
|
||||
hypridle-config = pkgs.writeText "hypridle-config" ''
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || hyprlock
|
||||
before_sleep_cmd = loginctl lock-session
|
||||
after_sleep_cmd = hyprctl dispatch dpms on
|
||||
}
|
||||
listener {
|
||||
timeout = 300
|
||||
on-timeout= brightnessctl -s && brightnessctl -e set 10%
|
||||
on-resume = brightnessctl -r
|
||||
}
|
||||
listener {
|
||||
timeout = 600
|
||||
on-timeout = loginctl lock-session
|
||||
}
|
||||
listener {
|
||||
timeout = 610
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
||||
'';
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
hypridle-config
|
||||
];
|
||||
}
|
||||
{ inputs, pkgs, ... }:
|
||||
(inputs.wrapper-manager.lib {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
{
|
||||
wrappers.hypridle = {
|
||||
basePackage = pkgs.hypridle;
|
||||
flags =
|
||||
let
|
||||
hypridle-config = pkgs.writeText "hypridle-config" ''
|
||||
general {
|
||||
lock_cmd = pidof hyprlock || hyprlock
|
||||
before_sleep_cmd = loginctl lock-session
|
||||
after_sleep_cmd = hyprctl dispatch dpms on
|
||||
}
|
||||
listener {
|
||||
timeout = 300
|
||||
on-timeout= brightnessctl -s && brightnessctl -e set 10%
|
||||
on-resume = brightnessctl -r
|
||||
}
|
||||
listener {
|
||||
timeout = 600
|
||||
on-timeout = loginctl lock-session
|
||||
}
|
||||
listener {
|
||||
timeout = 610
|
||||
on-timeout = hyprctl dispatch dpms off
|
||||
on-resume = hyprctl dispatch dpms on
|
||||
}
|
||||
'';
|
||||
in
|
||||
[
|
||||
"--config"
|
||||
hypridle-config
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}).config.wrappers.hypridle.wrapped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue