From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 0JdBBl4j3WN3ngAAbAwnHQ (envelope-from ) for ; Fri, 03 Feb 2023 16:08:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SHQaBl4j3WM2fAAA9RJhRA (envelope-from ) for ; Fri, 03 Feb 2023 16:08:14 +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 D4AE63940F for ; Fri, 3 Feb 2023 16:08:13 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pNxey-0001RN-K0; Fri, 03 Feb 2023 10:07:28 -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 1pNxex-0001R7-5M for emacs-orgmode@gnu.org; Fri, 03 Feb 2023 10:07:27 -0500 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNxev-00087A-5c for emacs-orgmode@gnu.org; Fri, 03 Feb 2023 10:07:26 -0500 Received: by mail-pj1-x1035.google.com with SMTP id pj3so5300676pjb.1 for ; Fri, 03 Feb 2023 07:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=8KNH3B1w57cMQZbcWpaAkkODeer51KYjZzr5f8p+wL8=; b=Gt02AWUXDWvy/0A2gKDPwAfuarqKOQ9ZcJRMlUiTSp6pF6ibcu+Ou5eNlcTcVwOPQF bj4BIXpR1x5jW2YVyEVHwL9dOxoSEkxnn5WibE+85//maZpeNZR+eG0HvWPRPttUjeCK mgJkfeeTbcy+VKzwICovhgDe2Mj2Jkh8Q9xE7C7rAwnsxtfj0B+YnuxOl/Sfr1obcacR H4daej3pJAhSuoFckXqxIaqmoMlkKAOViAuCvbJH/LE3GI0T5FySE83hSooV0XY4TUxo Fid4TMUD26nluFJ2U1KWbRRQriVipM+D5/NQFjKALERDfbxQY2Vr/25IohzPhIn9bcg+ qP0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8KNH3B1w57cMQZbcWpaAkkODeer51KYjZzr5f8p+wL8=; b=tcaKQNW/YY8MzWrg8Mh+Q+jBbe8nH8pb029g7D30/3ERp2WAJggccqtFVag5YmbOkX C2EWzEHJLzSbQSwi8zMSjZpiZsjwlh1xLx0VF4QBrLv3dWQ3j5jhSWYC6+7QVtcxL7sZ LtDc7SUuYbWmswWrLOuPYHOQe9BZ4iMToEByGDSmCkRFm9DMtqnYq4r56EOR4P7rB79t Z9W9HXfrzNAq7ZgUKsYGkRT7Gx21eoy2F/4mNu9eESMx1TgtShlLKoZpjiBLdgHEPcny rCM67kmO9iuO7EkAAaGm8dwgZQPHcMHTqTSWdQYTFeNH7lV47npo5E0j5Sb83o5uYFwy 8mbA== X-Gm-Message-State: AO0yUKVBrzejiTqveZup2jGo5CQfCQnyBM3LA+wFYKH1GYy13uCplDHq xmj1Tp+6p8s7fLG10/VXCUM= X-Google-Smtp-Source: AK7set+x6yhnd6Pln90gHPDWmKUtIytrnVUuWZw0FPGkGVUBdF5G1O+Al1yU7I9oKxmveui/q7/plg== X-Received: by 2002:a05:6a20:aa93:b0:bd:c7b2:725e with SMTP id ck19-20020a056a20aa9300b000bdc7b2725emr9613108pzb.22.1675436843464; Fri, 03 Feb 2023 07:07:23 -0800 (PST) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id u1-20020a17090add4100b0022c2be36b19sm1767583pjv.28.2023.02.03.07.07.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Feb 2023 07:07:23 -0800 (PST) Message-ID: <860dc32b-2aa7-cfca-cea6-3f836de0f578@gmail.com> Date: Fri, 3 Feb 2023 22:07:20 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: org-clock idle time in pgtk Emacs Content-Language: en-US To: Julien Cubizolles Cc: emacs-orgmode@gnu.org References: <875ylvnxf9.fsf@free.fr> <87wnea15hy.fsf@localhost> <87lelin03e.fsf@free.fr> <87y1phjzmg.fsf@localhost> <87r0v7s36f.fsf@free.fr> <877cwzndtt.fsf@localhost> From: Max Nikulin In-Reply-To: <877cwzndtt.fsf@localhost> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2607:f8b0:4864:20::1035; envelope-from=manikulin@gmail.com; helo=mail-pj1-x1035.google.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.09, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675436893; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8KNH3B1w57cMQZbcWpaAkkODeer51KYjZzr5f8p+wL8=; b=qE7Z3SWmGrLndk16NG/gDvzfGtpiSEtfyqajri2pJPg3j74zJcJuFQV6lVPK6/EVx2VGRg a0U9hlFug0QPduSumYiy/c7C+s82W7mbhAiQaC4hh279iGpLH9bav2V80Trhf5ABIdvdNf afnshoPalkMyOlerYi+c1jcsiD22oQf2SPsJI1gfPBNc5RhyUNt+nLs0IN6beUGngznrBf gBbfH83JlbRBAaHjO2tAKvEw+Do0wakzCrDMHNDXpcZmaxmvmo2bWNgiMPx85Pqu26tnbp hxrC/Cb6wUUoIG/DbTUdxyoeS+GmXHJJlxGe4AB/GoXAJUKVLgyNPp8+0YRMNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Gt02AWUX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675436893; a=rsa-sha256; cv=none; b=pgXsd9c3Rj45/RB9FYurKfcf/kKRFw6zcm+rxwasq8DHEiDVmsQOFgIs15LQXPs0QEG8WR 12tdNAmoEH/HmU7WlFY375IAa2mhEywAXG0TEm9Y4kPoWSSKGZ9aNyDhR8IKKIDXREjnMU O7voxmCc2pZaDqqQ07yC4G0KWKABEG4s1oI14TBOaugxcQ3XgE3o98sCHmZUJYbG4GZS7g Ke1dGH70dZ+nsbRNBFytpPijsIonz1r2lE6zTqWgNcydchfRbE5p3lrapSdebPqCzHHfyw oG+mSK06zqDxqpzBZNBz/q3EoBtiQPXv12hqsi9B/fk/ZNuN1KMHx/wtjD/F3Q== X-Migadu-Queue-Id: D4AE63940F X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Gt02AWUX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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" X-Migadu-Spam-Score: 5.63 X-Spam-Score: 5.63 X-TUID: oY8vg8xG355Z On 03/02/2023 19:17, Ihor Radchenko wrote: > Julien Cubizolles writes: > >>> 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. > > I would prefer something built-in or, at least, available via OS' > package manager. It seems, one can obtain the python package using pip install idle-time https://pypi.org/project/idle-time/ The issue is that the project has just 2 commits, a pull request for wider support of various environments is ignored by the author. The package already has CLI interface, but output format is not script-friendly: https://github.com/escaped/idle_time/blob/master/idle_time/__main__.py print(f"Idle time: {monitor.get_idle_time()}s") python3 -m idle-time > This does not look pgtk-specific. Is it? I see X11 and Windows in the implementation. xprintidle might be more reliable though. As to Org my opinion is still that a defcustom for user-defined function returning idle may be a better option.