/dbus_idle

Detect user idle time or inactivity on Linux.

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

dbus-idle

pypi python version license

Python library to detect user idle time in milliseconds or inactivity on Linux and Windows.

Requirements

  • Python 3.7 or later

Installation

Install using:

sudo apt install meson libdbus-glib-1-dev patchelf
pip install dbus-idle

Usage

You can use this module from the command line

dbus-idle

or access the current idle time from within your python program

from dbus_idle import IdleMonitor

milliseconds = IdleMonitor().get_dbus_idle()

Contribution

This is based on the work by Alexander Frenzel