lock: More goodness
This commit is contained in:
parent
82bafb3428
commit
b3f1d95634
|
@ -190,6 +190,16 @@
|
||||||
# toolbox
|
# toolbox
|
||||||
imagemagick
|
imagemagick
|
||||||
numbat
|
numbat
|
||||||
|
|
||||||
|
# Locker
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "lock";
|
||||||
|
text = ''
|
||||||
|
${config.frogeye.hooks.lock}
|
||||||
|
|
||||||
|
${pkgs.vlock}/bin/vlock --all
|
||||||
|
'';
|
||||||
|
})
|
||||||
];
|
];
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
# Favourite commands
|
# Favourite commands
|
||||||
|
|
|
@ -19,10 +19,7 @@ in
|
||||||
name = "xlock";
|
name = "xlock";
|
||||||
text = ''
|
text = ''
|
||||||
${config.frogeye.hooks.lock}
|
${config.frogeye.hooks.lock}
|
||||||
# TODO Maybe we could have a terminal lock? With vlock.
|
# TODO Reevaluate whether we want this or not
|
||||||
|
|
||||||
# TODO Does that work for all DMs?
|
|
||||||
# TODO Might want to use i3lock on NixOS configs still?
|
|
||||||
if ! ${pkgs.lightdm}/bin/dm-tool lock
|
if ! ${pkgs.lightdm}/bin/dm-tool lock
|
||||||
then
|
then
|
||||||
if [ -d ${config.xdg.cacheHome}/lockpatterns ]
|
if [ -d ${config.xdg.cacheHome}/lockpatterns ]
|
||||||
|
@ -50,9 +47,9 @@ in
|
||||||
"${mod}+F5" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -enable";
|
"${mod}+F5" = "exec --no-startup-id ${pkgs.xautolock}/bin/xautolock -enable";
|
||||||
};
|
};
|
||||||
startup = [
|
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"; }
|
{ 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...)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue