summaryrefslogtreecommitdiff
path: root/home/config/xsession.nix
diff options
context:
space:
mode:
authorQuentin Aristote <quentin@aristote.fr>2021-09-20 21:10:56 +0200
committerQuentin Aristote <quentin@aristote.fr>2021-09-20 21:27:26 +0200
commit6469af670d055c8f4a72a6e03a19d34f931ef177 (patch)
tree420df05a33eba03c39fca1bb36b9767278767f2e /home/config/xsession.nix
parent882243e350cc520f8fc6afe71ce972f7a481f19f (diff)
use xidlehook instead of xautolock
Diffstat (limited to 'home/config/xsession.nix')
-rw-r--r--home/config/xsession.nix17
1 files changed, 14 insertions, 3 deletions
diff --git a/home/config/xsession.nix b/home/config/xsession.nix
index bc01f56..4855aed 100644
--- a/home/config/xsession.nix
+++ b/home/config/xsession.nix
@@ -30,9 +30,20 @@ in {
};
# Session managment
- services.screen-locker = {
+ services.xidlehook = {
enable = backgroundImage != null;
- lockCmd = "${lockscreen}/bin/lockscreen.sh";
- inactiveInterval = 5;
+ not-when-fullscreen = true;
+ not-when-audio = true;
+ timers = [
+ {
+ delay = 120;
+ command = "${pkgs.brightnessctl}/bin/brightnessctl set 10%-";
+ canceller = "${pkgs.brightnessctl}/bin/brightnessctl set +10%";
+ }
+ {
+ delay = 180;
+ command = "${lockscreen}/bin/lockscreen.sh";
+ }
+ ];
};
}