Subject: Re: [bug#66932] [PATCH] services: Add xremap service.

From: Ludovic Courtès <[email-masked]>
Date: Sat, 02 Dec 2023 11:48:30 +0100

Hi András,

VÖRÖSKŐI András <[email-masked]> skribis:

> * gnu/services/desktop.scm (<xremap-configuration>): New record.
> (xremap-shepherd-service): New procedure.
> (xremap-service-type): New variable.
> * doc/guix.texi (Desktop Services): Document this.
>
> Change-Id: I76f9e238c72fb47226140e2b86dd9490cd9c9351

Nice!

> +(append
> +  (list
> +   (service xremap-service-type
> +                    (xremap-configuration
> +                     (config-file (plain-file "xremap.yml"
> +"modmap:
> +  - name: Global
> +    remap:
> +      CAPSLOCK:
> +        held: CONTROL_L
> +        alone: Esc
> +        alone_timeout_millis: 1000"))))

Did you consider writing “bindings” so that one can configure it Scheme,
as is the case for most other services?  (To be clear, I think we should
still allow people to provide their own Yaml file as is done here.)

If that’s too tricky/impractical, we can keep the patch as is, but
adding “native” configuration on top of that would be sweet.

I wonder if it would make sense, in a future patch, to also provide
‘home-xremap-service-type’ as a direct mapping of this service.  Food
for thought.

Thanks,
Ludo’.