services.xidlehook.enable
Whether to enable xidlehook systemd service.
Type: boolean
Default:
false
Example:
true
Declared by:
services.xidlehook.package
The xidlehook package to use.
Type: package
Default:
pkgs.xidlehook
Declared by:
services.xidlehook.detect-sleep
Whether to enable detecting when the system wakes up from a suspended state and resetting the idle timer.
Type: boolean
Default:
false
Example:
true
Declared by:
services.xidlehook.environment
Extra environment variables to be exported in the script.
These options are passed unescaped as export name=value.
Type: attribute set of string
Default:
{ }
Example:
{
primary-display = "$(xrandr | awk '/ primary/{print $1}')";
}
Declared by:
services.xidlehook.not-when-audio
Disable locking when audio is playing.
Type: boolean
Default:
false
Example:
true
Declared by:
services.xidlehook.not-when-fullscreen
Disable locking when a fullscreen application is in use.
Type: boolean
Default:
false
Example:
true
Declared by:
services.xidlehook.once
Whether to enable running the program once and exiting.
Type: boolean
Default:
false
Example:
true
Declared by:
services.xidlehook.timers
A set of commands to be executed after a specific idle timeout.
The commands specified in command and canceller
are passed escaped to the script.
To use or re-use environment variables that are script-dependent, specify them
in the environment section.
Type: list of (submodule)
Default:
[ ]
Example:
[
{
delay = 60;
command = "xrandr --output \"$PRIMARY_DISPLAY\" --brightness .1";
canceller = "xrandr --output \"$PRIMARY_DISPLAY\" --brightness 1";
}
{
delay = 120;
command = "${pkgs.writeShellScript "my-script" ''
# A complex script to run
''}";
}
]
Declared by:
services.xidlehook.timers.*.canceller
Command executed when the user becomes active again. This is only executed if the next timer has not been reached. Path to executables are accepted. The command is automatically escaped.
Type: string
Default:
""
Example:
${pkgs.libnotify}/bin/notify-send "Idle" "Resuming activity"
Declared by:
services.xidlehook.timers.*.command
Command executed after the idle timeout is reached. Path to executables are accepted. The command is automatically escaped.
Type: null or string
Default:
null
Example:
${pkgs.libnotify}/bin/notify-send "Idle" "Sleeping in 1 minute"
Declared by:
services.xidlehook.timers.*.delay
Time before executing the command.
Type: unsigned integer, meaning >=0
Example:
60
Declared by: