From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2IQYIVoF+2bZ/AAAqHPOHw:P1 (envelope-from ) for ; Mon, 30 Sep 2024 20:08:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2IQYIVoF+2bZ/AAAqHPOHw (envelope-from ) for ; Mon, 30 Sep 2024 22:08:58 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=jsMJQLJE; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="kvox/CGk"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727726938; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Wrc+wM+XtDB+ujsLX22LLj0MAenpJe5ULribjsJbY+I=; b=bYAeEJOROIrGm7Od3VS6YKQyxNLJSJ3cCgU/OmA/Rx2pSejCoDp1zeTYiMZ4RkvqcE6e+m LtmEP7w0X62sedYsRv0zGHic7m95nZyk1L0OMSY+hhcY52X/+j13ESUWkD4LETXW3IrVbF FPYTA4BXAyGJja2NaZalFAAYn77X+FEgIrxuXg1Se+/R+1tCiRlMmoeqO4D2lpByzw3ypx U43//NUYPTtoR/gGkoReNYfdYg1cteUBZMPi7RBAgRodvmE+CbwSu2vOm0Jrr30PhtbZ/u /AIaOzEUHJLyl3PXvY/UrvaBWfwRrI/Bh+b9/mFqjhiltgxE3kmlPUHT+LP9xg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=jsMJQLJE; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="kvox/CGk"; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727726938; a=rsa-sha256; cv=none; b=TaHMKEHMSfF0iyThD2gl67DO5Iwipb6y+7gm/8T4/LbOmtXUkma6zQO7G/nfE/ZsfTy4Nn kM2kWMMbBOZFMlJLnIAHV6YfR4nyYvBxiLRyJVSHWIeiBgsd8/YNFaA98GLCLZ5TyZ+2fZ uAE4AWcTo/ft39jjBPQo3N+9s+U3b9iSGBz/KdQmnOG8iUoXEuAYf/JkR0gVQ0TvM7BtV/ Ip8UwQprS9lY4YYiUHnk5wie8g4lilhl1LBwj1GLjFPUL7Kjx3cE28l4HsXPTBsa601pGs HPo7GEgOCUULCaYRei/EGA8t45pWzyFHSOZ0t7AVzHlGSOPaRPCofveXJLmXZg== 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 451CA55E2C for ; Mon, 30 Sep 2024 22:08:58 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svMh8-000744-Iu; Mon, 30 Sep 2024 16:08:34 -0400 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 1svMh3-0006oG-8D for guix-patches@gnu.org; Mon, 30 Sep 2024 16:08:29 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svMh2-0005Se-Uy for guix-patches@gnu.org; Mon, 30 Sep 2024 16:08:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Wrc+wM+XtDB+ujsLX22LLj0MAenpJe5ULribjsJbY+I=; b=jsMJQLJEg/F69KBw39nK80S6/LWSI3EzFvj+3L0HQxU4UWQZoMVNPLeobN+w3vDdJvw8tr610mR2MfPDauzltzCuL9KmkWcgrIYy8fgaikIobLe4GA30mTZPQTUfFtBspz8NmpyNvQ7lPtvcyuEYkjIgPkis5y+uKf+BC6bH9EiL0Qi9SIBOtvjOhuGFVm8nEJGH91Shw/vT7xy21hEN+R+ZhHWo+7rsJFVg3UHID3AC+Z5B/OgRQwmrTnfPJXFb+VEhIWtWBuVXUlSrMxf8tuX3JD8XwOv0I0Mdadg2uQJ8HKS8ZujfG4iObC5MNM+YQbZmrRzw2VgpTxFV18lHdw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svMha-0005dm-11 for guix-patches@gnu.org; Mon, 30 Sep 2024 16:09:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72714] [PATCH v6] home: services: Add 'home-sway-service-type'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Sep 2024 20:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72714 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Arnaud Daby-Seesaram Cc: Hilton Chain , 72714@debbugs.gnu.org Received: via spool by 72714-submit@debbugs.gnu.org id=B72714.172772690221367 (code B ref 72714); Mon, 30 Sep 2024 20:09:01 +0000 Received: (at 72714) by debbugs.gnu.org; 30 Sep 2024 20:08:22 +0000 Received: from localhost ([127.0.0.1]:46773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svMgu-0005YG-4H for submit@debbugs.gnu.org; Mon, 30 Sep 2024 16:08:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svMgr-0005Xh-TY for 72714@debbugs.gnu.org; Mon, 30 Sep 2024 16:08:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svMgE-0005Qb-F8; Mon, 30 Sep 2024 16:07:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=Wrc+wM+XtDB+ujsLX22LLj0MAenpJe5ULribjsJbY+I=; b=kvox/CGkyjoWK3ymEfPY xJ/DAhK83o0f7r+RFH0qac+3yc2KeAlSmJlTHWoa/MncAJaUti/qKIT9o6NkYrsjavwE6eJwywBZa Gscej2CveMbwmg/AgDLYmD8HeEvnpAJBjamWoNGE+2SRRobUuzDzQfkw7YCfZZIR+1ZIVnyRcD3CY BiFT3sB2Qjz1NCwA5L8b/WDLn7aX06u5DOQJzYjFXYlqzevQh/bmth1Ot50L5w0Vn1XUL/vu+RzJ5 l/wOcKnNs/W9eARLkX9uDoEQ5Cecnepb+TYAOT6mrdMC4sKPm/TDqMFTrgYbqAtgojuOQp/qFx+gx 6MId9YQ1chQmhQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <20240925080442.13752-1-ds-ac@nanein.fr> (Arnaud Daby-Seesaram's message of "Wed, 25 Sep 2024 10:00:43 +0200") References: <1e82e473639f21a2950a0827f156437ef1bc9c48.1724081442.git.ds-ac@nanein.fr> <20240925080442.13752-1-ds-ac@nanein.fr> Date: Mon, 30 Sep 2024 22:07:35 +0200 Message-ID: <87zfno52ig.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.49 X-Spam-Score: -4.49 X-Migadu-Queue-Id: 451CA55E2C X-Migadu-Scanner: mx13.migadu.com X-TUID: cKjlmLw1gBRI Hi Arnaud, Arnaud Daby-Seesaram skribis: > * gnu/home/services/sway.scm: New file. > (home-sway-service-type): New variable. > (sway-configuration->file): New procedure. > (sway-configuration): New configuration record. > (sway-bar): New configuration record. > (sway-output): New configuration record. > (sway-input): New configuration record. > (point): New configuration record. > (sway-color): New configuration record. > (sway-border-color): New configuration record. > (sway-mode): New configuration record. > (flatten): New procedure. > * gnu/local.mk: Add gnu/home/services/sway.scm. > * doc/guix.texi (Sway window manager): New node to document the above cha= nges. I don=E2=80=99t use Sway myself but it looks like a welcome addition. I trust Hilton=E2=80=99s comment here so here are some more superficial comments. > +The @code{(gnu home services sway)} module provides > +@code{home-sway-service-type}, a home service to configure sway in a > +declarative way. To add more context: =E2=80=9C=E2=80=A6 to configure the @uref{https://github.com/swaywm/sway,Sw= ay window manager for Wayland} in a declarative way.=E2=80=9D > +@quotation Note > +This home service only sets up the configuration file and profile > +packages for sway. It does @i{not} start sway in any way. If you want s/sway/Sway/ s/@i/@emph/ > +@defvar sway-configuration->file Should be =E2=80=9C@deffn {Procedure} sway-configuration->file config=E2=80= =9D. > +Here is an example of a service and its configuration that you could add > +to the @code{services} field of your @code{home-environment}: I would move the example right before =E2=80=9C@quotation Note=E2=80=9D. > +@item @code{always-execs} (default: @code{'()}) > +Programs to execute at startup time @i{and} after every configuration > +reload. The value of this field is a list of strings or G-expressions. > + > +@item @code{execs} (default: @code{%sway-default-execs}) > +Programs to execute at startup time. The value of this field is a list > +of strings or G-expressions. Please avoid abbreviations. Maybe these fields could be called =E2=80=98startup+reload-programs=E2=80=99 and =E2=80=98startup-programs=E2= =80=99? > +The default value, @code{%sway-default-execs}, executes @code{swayidle} Likewise, @code{%sway-default-startup-programs}? > +@deftp {Data Type} sway-input > +@code{sway-input} records describe input blocks (see@ > +@cite{sway-input(5)}). For example, the following snippet makes all > +keyboards use a french layout, in which @kbd{capslock} has been remaped > +to @kbd{ctrl}: > +@lisp > +(sway-input (identifier "type:keyboard") > + (xkb-layout "fr") > + (xkb-options '("ctrl:nocaps"))) > +@end lisp Would it be possible here to reuse the record documented in ? If it=E2=80=99s possible, that would provide a nicely consistent interface.= If there=E2=80=99s the need for an extra identifier, maybe you=E2=80=99ll stil= l need : (sway-input (identifier "type:keyboard") (layout (keyboard-layout "tr"))) WDYT? > +@lisp > +(program-file > + "sway-bar-status" > + (with-imported-modules > + (source-module-closure > + '((ice-9 format) (srfi srfi-19))) =E2=80=98with-imported-modules=E2=80=99 can be removed here because (ice-9 = format) and (srfi srfi-19) are provided by Guile itself. That=E2=80=99s it for me! Could you send updated patches? Thank you! Ludo=E2=80=99.