Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b5e1f91
Support other Linux Distributions
bkbilly Nov 5, 2022
c6f3fd5
Rename idle-time to dbus-idle
bkbilly Mar 12, 2023
cfdb05f
added workflows
bkbilly Mar 12, 2023
48e512a
update license
bkbilly Mar 12, 2023
0bbf145
update license
bkbilly Mar 12, 2023
29fdca2
2023.3.1
bkbilly Mar 12, 2023
d176a77
Update README.md
bkbilly Mar 12, 2023
8493130
Added xprintidle fallback
bkbilly Mar 13, 2023
6c19cbb
Merge remote-tracking branch 'origin/master'
bkbilly Mar 13, 2023
2d2e82e
Check for xprintidle command
bkbilly Dec 29, 2023
f67fd65
bump version 2023.12.0
bkbilly Dec 29, 2023
ec672ff
update setuptools and wheel
bkbilly Dec 29, 2023
ac121cb
Fixed Segmentation Fault issue caused by X11
bkbilly Mar 20, 2024
f52c1d2
Bump Version
bkbilly Mar 20, 2024
b98672f
info as debug
bkbilly Mar 21, 2024
c929f7c
bump version
bkbilly Mar 21, 2024
1639f06
Replace dbus-python with dasbus
bkbilly Jul 26, 2024
49a5cb7
Fix dependencies
bkbilly Jul 26, 2024
8e338a2
Save used method and reuse it
bkbilly Dec 26, 2024
d7ee940
Check for errors when rerunning
bkbilly Dec 28, 2024
f8f689d
Remove DasBus system dependency
bkbilly Mar 30, 2025
0a3ee99
Exclude Windows from Linux-specific dependencies
kksandr7 Mar 30, 2025
c68a39c
Merge pull request #2 from kksandr7/master
bkbilly Mar 30, 2025
13d7653
Windows Support
bkbilly Mar 30, 2025
b2fe9e1
Add support for Wayland only environments
bkbilly May 13, 2025
0baee86
Return swayidle time in milliseconds instead of seconds
bkbilly May 15, 2025
0c30800
Update dependencies and project version
bkbilly Jul 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: bkbilly # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://www.paypal.me/bkbillybk']
39 changes: 39 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '20 20 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-stale: 60
days-before-close: 7
18 changes: 0 additions & 18 deletions .pre-commit-config.yaml

This file was deleted.

23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
# idle-time
# dbus-idle

[![pypi](https://img.shields.io/pypi/v/idle-time.svg)](https://pypi.python.org/pypi/idle-time) [![Build Status](https://travis-ci.org/escaped/idle-time.png?branch=master)](http://travis-ci.org/escaped/idle-time) [![Coverage](https://coveralls.io/repos/escaped/idle-time/badge.png?branch=master)](https://coveralls.io/r/escaped/idle-time) ![python version](https://img.shields.io/pypi/pyversions/idle-time.svg) ![Project status](https://img.shields.io/pypi/status/idle-time.svg) ![license](https://img.shields.io/pypi/l/idle-time.svg)
[![pypi](https://img.shields.io/pypi/v/dbus-idle.svg)](https://pypi.python.org/pypi/dbus-idle)
![python version](https://img.shields.io/pypi/pyversions/dbus-idle.svg)
![license](https://img.shields.io/pypi/l/dbus-idle.svg)

Detect user idle time or inactivity on Linux and Windows.

**WARNING** This project is in an alpha status! Though there is already some code to support Windows, it has only been tested on Wayland/Gnome.
Python library to detect user idle time in milliseconds or inactivity on Linux and Windows.


## Requirements

* Python 3.6 or later
* Python 3.7 or later


## Installation

Install using `pip install idle-time`
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

python -m idle-time

```bash
dbus-idle
```
or access the current idle time from within your python program
```python
from dbus_idle import IdleMonitor

milliseconds = IdleMonitor().get_dbus_idle()
```

from idle_time import IdleMonitor

monitor = IdleMonitor.get_monitor()
monitor.get_idle_time()
## Contribution
This is based on the work by [Alexander Frenzel](https://github.com/escaped/dbus_idle)
Loading