mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-09-10 03:51:46 +02:00
fix: refine shoukei idle screen off
This commit is contained in:
@@ -10,5 +10,25 @@ let
|
||||
];
|
||||
in
|
||||
lib.genAttrs hosts (
|
||||
name: outputs.nixosConfigurations.${name}.config.home-manager.users.${username}.home.homeDirectory
|
||||
name:
|
||||
let
|
||||
hm = outputs.nixosConfigurations.${name}.config.home-manager.users.${username};
|
||||
hypridleConfig = builtins.readFile hm.xdg.configFile."hypr/hypridle.conf".source;
|
||||
hasHypridleLines = lines: lib.hasInfix (lib.concatStringsSep "\n" lines) hypridleConfig;
|
||||
in
|
||||
{
|
||||
homeDirectory = hm.home.homeDirectory;
|
||||
hypridleScreenOffIgnoresInhibitors = hasHypridleLines [
|
||||
" timeout = 360 # 6 minutes"
|
||||
" ignore_inhibit = true"
|
||||
];
|
||||
hypridleScreenOffSkipsPlayingMedia = hasHypridleLines [
|
||||
" condition_cmd = ! playerctl -a status 2>/dev/null | grep -q '^Playing$'"
|
||||
" condition_retry = 30"
|
||||
];
|
||||
hypridleLockIgnoresInhibitors = hasHypridleLines [
|
||||
" timeout = 1200 # 20 minutes"
|
||||
" ignore_inhibit = true"
|
||||
];
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user