Skip to content

Instantly share code, notes, and snippets.

@jluttine
Created September 29, 2019 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jluttine/d32f3a5c60ea3b20c4c73edb7cb0447b to your computer and use it in GitHub Desktop.
Save jluttine/d32f3a5c60ea3b20c4c73edb7cb0447b to your computer and use it in GitHub Desktop.
systemd.user.services.xidlehook = {
description = "Screen Lock Daemon";
wantedBy = [ "nide.target" ];
partOf = [ "nide.target" ];
script = ''
#!/bin/sh
${pkgs.xidlehook}/bin/xidlehook \
--not-when-fullscreen \
--not-when-audio \
--timer normal 5 "${pkgs.xsecurelock}/libexec/xsecurelock/dimmer" " " \
--timer primary 15 "/run/wrappers/bin/sudo ${pkgs.systemd}/bin/systemctl start physlock" " "
'';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment