GNU bug report logs - #76060
[PATCH] gnu: home: services: Add 'wayland-display' service.

Previous Next

Package: guix-patches;

Reported by: Sisiutl <sisiutl <at> egregore.fun>

Date: Tue, 4 Feb 2025 21:45:02 UTC

Severity: normal

Tags: patch

Merged with 76057, 76058, 76619, 76659, 76667

Full log


Message #8 received at 76060 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sisiutl <sisiutl <at> egregore.fun>
Cc: 76060 <at> debbugs.gnu.org, Janneke Nieuwenhuizen <janneke <at> gnu.org>,
 Tanguy Le Carrour <tanguy <at> bioneland.org>, Andrew Tropin <andrew <at> trop.in>
Subject: Re: [bug#76060] [PATCH] gnu: home: services: Add 'wayland-display'
 service.
Date: Wed, 05 Feb 2025 22:48:07 +0100
Hello,

(Cc’ing members of the Home team.)

Sisiutl <sisiutl <at> egregore.fun> skribis:

> * gnu/home/services/desktop.scm (wayland-shepherd-service): New procedure.
> (home-wayland-service-type): New variable.
>
> Change-Id: Ide1ca748551a280efe8286b4ac1e46787b108443

Nice improvement.

> -
> +
>  ;;;
>  ;;; Waiting for X11.

These ^L characters are page breaks, which are useful when navigating
through the file; please preserve them.

> +(define (wayland-shepherd-service config)

[...]

> +         (respawn? #t)
> +         (respawn-limit (home-wayland-configuration-tries config))
> +         (respawn-delay 1)

I believe ‘home-wayland-configuration-tries’ does not exist.

But I think you can remove these three lines because respawning only
applies to services that start a daemon, which is not the case here.

> +              (define (socket? directory regex)
> +                (find (match-lambda
> +                        ((or "." "..") #f)
> +                        (name
> +                         (let ((name (in-vicinity directory
> +                                                  name)))
> +                           (and (string-match regex name)
> +                                (access? name O_RDWR)))))
> +                      ;; Wayland names its sockets `wayland-n`. With
> +                      ;; `reverse`, we pick up on the last Wayland instance
> +                      ;; created (essentially what we always want to do).
> +                      (or (reverse (scandir directory)) '())))

I think ‘find-socket’ would be a better name than ‘socket?’.

Nitpick: prefer 'straight quotes' or ‘curly quotes’ in comments.

> +(define-public home-wayland-service-type

Please use plain ‘define’ and add to the export list at the top.

> +  (service-type
> +   (name 'home-wayland-display)
> +   (extensions (list (service-extension home-shepherd-service-type
> +                                        wayland-shepherd-service)))
> +   (default-value 10)

I believe this value is unused.  Maybe set it to #f for clarity.

One last thing: could you add a note in ‘doc/guix.texi’ about this
service, right after ‘home-x11-service-type’?

Thanks in advance!

Ludo’.




This bug report was last modified 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.