lock: More goodness

This commit is contained in:
Geoffrey Frogeye 2024-03-09 19:09:30 +01:00
parent 82bafb3428
commit b3f1d95634
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
2 changed files with 13 additions and 6 deletions

View file

@ -190,6 +190,16 @@
# toolbox
imagemagick
numbat
# Locker
(pkgs.writeShellApplication {
name = "lock";
text = ''
${config.frogeye.hooks.lock}
${pkgs.vlock}/bin/vlock --all
'';
})
];
sessionVariables = {
# Favourite commands

View file

@ -19,10 +19,7 @@ in
name = "xlock";
text = ''
${config.frogeye.hooks.lock}
# TODO Maybe we could have a terminal lock? With vlock.
# TODO Does that work for all DMs?
# TODO Might want to use i3lock on NixOS configs still?
# TODO Reevaluate whether we want this or not
if ! ${pkgs.lightdm}/bin/dm-tool lock
then
if [ -d ${config.xdg.cacheHome}/lockpatterns ]
@ -50,9 +47,9 @@ in
"${mod}+F5" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -enable";
};
startup = [
# Lock screen after 10 minutes
# Stop screen after 10 minutes, 1 minutes after lock it
{ notification = false; command = "${pkgs.xautolock}/bin/xautolock -time 10 -locker '${pkgs.xorg.xset}/bin/xset dpms force standby' -killtime 1 -killer xlock"; }
# TODO There's a services.screen-locker.xautolock but not sure it can match the above command
# services.screen-locker.xautolock is hardcoded to use systemd for -locker (doesn't even work...)
];
};
};