Closed radmen closed 3 years ago
Feel free to PR, should be as simple as adding a check if it slept much longer than the intended amount of sleep (maybe like >3 seconds longer?), and calling the reset function which will start counting from zero again.
@jD91mZM2 I'd love to help, although I've no idea how to write in Rust. Feel free to close this issue if you don't want to implement this feature :)
Nah, I'll leave it open. Maybe someone else sees it!
As a workaround, one can run xidlehook-client reset-idle
immediately after systemctl suspend --wait
in the latest master
Update: Does master's --detect-sleep
work for you? :)
Hey, thank you very much for this update. Unfortunately, I can't test it right now. The reason is stupid and plain - I use Nixos and didn't figure out (yet) how I can install software from different sources than my own or the official ones. Hope you understand :)
Hey, another NixOS user, that's awesome :)
Legacy nix syntax for building:
nix-build https://github.com/jD91mZM2/xidlehook/archive/master.tar.gz
result/bin/xidlehook ...
New nix syntax for building:
nix build -f https://github.com/jD91mZM2/xidlehook/archive/master.tar.gz
result/bin/xidlehook ...
Newest nix syntax (only on an unstable nix version with support for nix flakes):
nix build github:jD91mZM2/xidlehook
result/bin/xidlehook ...
Install it into your user profile with
nix-env -if https://github.com/jD91mZM2/xidlehook/archive/master.tar.gz
xidlehook ...
Newest nix syntax (unstable nix only)
nix profile install github:jD91mZM2/xidlehook
In your configuration.nix:
{
environment.systemPackages = [
(import (pkgs.fetchFromGitHub {
owner = "jD91mZM2";
repo = "xidlehook";
rev = "8c419d40c8e126c5d81eff0af5c8dfd98a0542a6";
sha256 = "sha256-ym1yw0gf1i8FXQ2rP2u4mgJRO+3X6vKYWFVmkUxqMBw=";
}))
];
}
@jD91mZM2 thanks for the instructions. Sometimes I just can't believe it can be this easy. I've updated the application, will come back to you in few days. Thank you!
New update was released, and is making its way into nixpkgs
Awesome, thanks! So, to just let you know, I didn't have any issues with the package :) When the system was resumed, the timers reset correctly. Thank you!
Hey,
I noticed that xidlehook triggers a timer when the system resumes its state from a suspend. While it's not a big problem for me, I think it would be nice if it could detect that a system was suspended, so the timers should be reset on the resume.
XAutolock has
-detectsleep
that:Would it be possible to have something similar?
Thank you!