Instead of implementing your extension as something that communicates with xidlehook, what about implementing your extension as something that is xidlehook?
This library lets you create your own xidlehook front-end using a powerful timer and module system.
The module trait and some useful implementations such as combinators
The timer trait and some useful implementations
An identifier for a timer, based on the index in the timer list and its length.
The main xidlehook instance that allows you to schedule things
Return value of
The default error type for xidlehook. Unfortunately, it’s a dynamic type for now.
An alias to Result which overrides the default Error type.