From patchwork Fri Mar 10 22:16:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Miguel_=C3=81ngel_Moreno?= X-Patchwork-Id: 47860 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7A13B16E86; Fri, 10 Mar 2023 22:17:34 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A94B216E82 for ; Fri, 10 Mar 2023 22:17:30 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pal2w-0001kz-F4; Fri, 10 Mar 2023 17:17:06 -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 1pal2t-0001kW-RZ for guix-patches@gnu.org; Fri, 10 Mar 2023 17:17:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pal2t-00050f-DU for guix-patches@gnu.org; Fri, 10 Mar 2023 17:17:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pal2t-0003PY-92 for guix-patches@gnu.org; Fri, 10 Mar 2023 17:17:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#62107] [PATCH] home: services: Add home-unclutter-service-type. Resent-From: conses Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Mar 2023 22:17:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62107 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62107@debbugs.gnu.org Cc: contact@conses.eu X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167848661313077 (code B ref -1); Fri, 10 Mar 2023 22:17:03 +0000 Received: (at submit) by debbugs.gnu.org; 10 Mar 2023 22:16:53 +0000 Received: from localhost ([127.0.0.1]:56086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pal2i-0003Oq-J6 for submit@debbugs.gnu.org; Fri, 10 Mar 2023 17:16:52 -0500 Received: from lists.gnu.org ([209.51.188.17]:43790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pal2f-0003OZ-70 for submit@debbugs.gnu.org; Fri, 10 Mar 2023 17:16:49 -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 1pal2e-0001hZ-Gz for guix-patches@gnu.org; Fri, 10 Mar 2023 17:16:48 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pal2c-0004xe-Cv for guix-patches@gnu.org; Fri, 10 Mar 2023 17:16:48 -0500 Received: (Authenticated sender: contact@conses.eu) by mail.gandi.net (Postfix) with ESMTPSA id A8ADCFF808; Fri, 10 Mar 2023 22:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=conses.eu; s=gm1; t=1678486604; h=from:from: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; bh=wY/t4pIFfLMw2RAiOjPG+Ll/NBvDLNgax4Sy31snzYg=; b=F2iZEX9G07BIcizyD1BfX4Fn/XZaUUn58qgnVtcV/j4BaBT5l/MmGlN/BVjbQg8euu2TRO LJk+zZpE0UcV35Gy6i6EHRIHPrfrxGwbjiMDQqYpN9fQSPYnpLX84UA+BsPTID1Y5koahp PG0bzvf9wIvI2YueTXW7LnF4UxIeNPr9VLtDVTcZD5iGrPaJofZ3IOm7895L+OjJIJgHwG kporIiPeDZ/mOOv36JUN0jCenedPRYz823SqGX3MPVO0q6xVsiJN0DcFRtrej9vqjFVmXW 9uv1RIgizt5FJciW3fLL+vfeQ4YkSDGzcOAUtOnRf7t6wWP29b4bJLGcWZ0ang== From: conses Date: Fri, 10 Mar 2023 23:16:41 +0100 Message-ID: <86lek41cc6.fsf@conses.eu> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.199; envelope-from=contact@conses.eu; helo=relay9-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/home/services/xdisorg.scm: New file. --- gnu/home/services/xdisorg.scm | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 gnu/home/services/xdisorg.scm diff --git a/gnu/home/services/xdisorg.scm b/gnu/home/services/xdisorg.scm new file mode 100644 index 0000000000..02c538ff9f --- /dev/null +++ b/gnu/home/services/xdisorg.scm @@ -0,0 +1,72 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2023 conses +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu home services xdisorg) + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (gnu packages xdisorg) + #:use-module (gnu services configuration) + #:use-module (guix packages) + #:use-module (guix gexp) + #:export (home-unclutter-configuration + home-unclutter-service-type)) + +(define-configuration/no-serialization home-unclutter-configuration + (unclutter + (package unclutter) + "The @code{unclutter} package to use.") + (seconds + (integer 5) + "The number of idle seconds to wait to remove the cursor.")) + +(define (home-unclutter-shepherd-service config) + (list + (shepherd-service + (provision '(unclutter)) + (requirement '()) + (one-shot? #t) + (start #~(make-forkexec-constructor + (list + #$(file-append + (home-unclutter-configuration-unclutter config) + "/bin/unclutter") + "-idle" + (number->string + #$(home-unclutter-configuration-seconds config))) + #:log-file (string-append + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))) + "/unclutter.log")))))) + +(define (home-unclutter-profile-service config) + (list (home-unclutter-configuration-unclutter config))) + +(define home-unclutter-service-type + (service-type + (name 'home-unclutter) + (extensions + (list + (service-extension + home-profile-service-type + home-unclutter-profile-service) + (service-extension + home-shepherd-service-type + home-unclutter-shepherd-service))) + (default-value (home-unclutter-configuration)) + (description "Set up an unclutter daemon.")))