Skip to main content

idle_secs

Function idle_secs 

Source
pub fn idle_secs() -> Result<u64, String>
Expand description

Seconds since the last keyboard/mouse input, or a display-error string if no idle source is available this call.

user_idle is the primary source on every platform. On GNOME/Wayland it fails, so we fall back to Mutter’s IdleMonitor. The error surfaced on total failure is the primary one — that’s the message callers have always logged, and the non-GNOME Wayland case (e.g. sway, where neither source works) is the one where the error matters.