hypr dots
This commit is contained in:
parent
98d71e0170
commit
7bca3bbe77
10 changed files with 560 additions and 471 deletions
35
dots/.config/hypr/hypridle.conf.nix
Normal file
35
dots/.config/hypr/hypridle.conf.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
inherit (builtins) concatStringsSep;
|
||||
|
||||
cfg = config.horseman.dots.hypr.hypridle;
|
||||
username = config.horseman.username;
|
||||
hypr = config.horseman.wm.hyprland.config;
|
||||
in {
|
||||
options = {
|
||||
horseman.dots.hypr.hypridle = {
|
||||
enable = mkEnableOption "~/.config/hypr/hypridle.conf";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.${username}.xdg.configFile."hypr/hypridle.conf".text = ''
|
||||
general {
|
||||
lock_cmd = ${hypr.sleep.lockCommand}
|
||||
}
|
||||
|
||||
${concatStringsSep "\n\n" (map (lis: ''
|
||||
listener {
|
||||
timeout = ${toString lis.timeout}
|
||||
on-timeout = ${lis.onTimeout}
|
||||
on-resume = ${lis.onResume}
|
||||
}
|
||||
'')
|
||||
hypr.sleep.listeners)}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue