NixOS-Config/modules/home/wms/niri/programs/sleep-niri/default.nix

11 lines
292 B
Nix

{ pkgs, config, ... }:
{
home.packages = with pkgs; [
(pkgs.writeScriptBin "sleep-niri" ''
swaylock & ${pkgs.swayidle}/bin/swayidle -w \
timeout 1 'niri msg action power-off-monitors' \
resume 'niri msg action power-on-monitors; pkill -9 swayidle'
'')
];
}