emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-clock idle time in pgtk Emacs


From: Julien Cubizolles
Subject: Re: org-clock idle time in pgtk Emacs
Date: Fri, 03 Feb 2023 06:55:52 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Ihor Radchenko <yantar92@posteo.net> writes:


>> +(defcustom org-clock-pgtkidle-program-name
>> +  (if (executable-find "jc-idle-time")
>> +      "jc-idle-time")
>> +  "Name of the program which prints idle time in milliseconds.
>
> May I know where "jc-idle-time" is coming from? Is it a built-in command
> on wayland?

Sorry, I forgot to mention. It's a custom python program, working both
in X11 and wayland. I didn't find a built-in command.

--8<---------------cut here---------------start------------->8---
#!/usr/bin/env python3

from idle_time import IdleMonitor

monitor = IdleMonitor.get_monitor()
print(f"{1000*monitor.get_idle_time():.0f}")
--8<---------------cut here---------------end--------------->8---

-- 
Julien Cubizolles




reply via email to

[Prev in Thread] Current Thread [Next in Thread]