From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mFqtBSui3GMWFQAAbAwnHQ (envelope-from ) for ; Fri, 03 Feb 2023 06:56:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id sNqXBSui3GM45wAAauVa8A (envelope-from ) for ; Fri, 03 Feb 2023 06:56:59 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 93828E5CA for ; Fri, 3 Feb 2023 06:56:58 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNp3N-00049Y-L2; Fri, 03 Feb 2023 00:56:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNp3L-00049O-E1 for emacs-orgmode@gnu.org; Fri, 03 Feb 2023 00:56:03 -0500 Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pNp3J-0001bw-L2 for emacs-orgmode@gnu.org; Fri, 03 Feb 2023 00:56:03 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pNp3H-000ANi-L8 for emacs-orgmode@gnu.org; Fri, 03 Feb 2023 06:55:59 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Julien Cubizolles Subject: Re: org-clock idle time in pgtk Emacs Date: Fri, 03 Feb 2023 06:55:52 +0100 Message-ID: <87r0v7s36f.fsf@free.fr> References: <875ylvnxf9.fsf@free.fr> <87wnea15hy.fsf@localhost> <87lelin03e.fsf@free.fr> <87y1phjzmg.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:Uj8PGjrnrXZsH1iwQSXhRKpVsd8= Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675403818; a=rsa-sha256; cv=none; b=PVB+M4k5+lQJB34LbMWXHWC5VJu/JMsf28aBqC3i0TLjIeOqBJJo3Z+cEWt+r24A9nOP9I UsKX7KQHvheibfu2LCwsCvNA3m2W8YDU0Grz0pBNSHgwi1BmyG3V4W1ERP78o6G+gtObq4 mGTqg46dzZR0CTfKQmnTvdKgZNm2p98sl4h6EyPFNutdSWsj0T5+Ae82wXKN70bTsEP0Z9 4iYbZO9TfUopXV8GLsCyz/GRy82WyZoPeg31fsBmtUl6WWKGmys3q9hXR3LckNVG5NtriB Ldn7W6KH1DYZaQoPFEqt3eXeAkyV73TtB0PCTWrQyYF7jbC92LRVolBJU+Sqzg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675403818; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GouGU5b1Ui4ukR/AUnJZ2P7ExUtO6+k0oyPOFNzXamM=; b=SigXHizxApQ8i9FDSIgrdeWvMZGVrFilw+VQguU5y4ByNkEk1dTvsXniz6lPqpbrZAc9wS dWxg25+JFzEEwdTxEYYvRYozkRjwwKfaavk9V0NvrN7ZG73zPJENI5TQ1v7DLN7ZeeNYyI tF7r/j1v/+Vt3i0c1DDU4bqAJpZQp860+V4VqaTBkSILVu0nRaXZWNA5Vkln8ytgwOo111 c3a5sNdZDQzDpdH2z6JOD91G/+VGz/zM/iD5IJshcc+ipT1BIkEC83FOYF4VezpN+ynku0 d1IMN3xf1LpmGhL3O3qTIu7WgoBqqRVvRuHM6P38jQdScy5/AghtQXP3B1Pryw== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 4.13 X-Spam-Score: 4.13 X-Migadu-Queue-Id: 93828E5CA Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=free.fr (policy=none) X-TUID: WRPFkCJembL4 Ihor Radchenko 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