GNU bug report logs - #72714
[PATCH] home: services: Add 'home-sway-service-type'.

Previous Next

Package: guix-patches;

Reported by: Arnaud Daby-Seesaram <ds-ac <at> nanein.fr>

Date: Mon, 19 Aug 2024 15:33:02 UTC

Severity: normal

Tags: patch

Done: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Arnaud Daby-Seesaram <ds-ac <at> nanein.fr>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: Hilton Chain <hako <at> ultrarare.space>, 72714 <at> debbugs.gnu.org
Subject: [bug#72714] [PATCH v4] home: services: Add 'home-sway-service-type'.
Date: Sun, 22 Sep 2024 15:43:45 +0200
[Message part 1 (text/plain, inline)]
Hello Florian and Hilton,

Thank you for your words and reviews!  It is nice to know that a few
people are interested :).

> I’m still looking at the details of sway, so I could myself push your
> patch with confidence to guix.git, but would also be happy if others
> pushed it
Nice, NB: it is also fine 


Upon reading the code again, one point is still unclear: the list of
packages that I include in user profiles seems a bit random :/.

- sway, swaylock and swaybg: useful to launch some commands manually
  (including swaymsg).

- waybar, dmenu and bemenu: do not seem necessary.  I will probably
  remove them.

- dbus, xdg-desktop-portal and xdg-desktop-portal-wlr: may be
  interesting to have.  On my laptop, screen sharing¹ only works when
  xdg-desktop-portal and xdg-desktop-portal-wlr are in the same profile²
  (associated executable files end up in ~/.guix-home/profile/libexec/).

                              ¹: I do not have a fully functional setup
                              for screen sharing yet (it does not work
                              in all web browsers).  I (or someone else)
                              should probably add elements in the
                              default `execs' / `always-execs' fields
                              if/when they have a working setup later.
                              NB: this should not be a road blocker for
                              the current patch IMHO.

                              ²: I do not know if that is a hard
                              requirement or if my issues are related to
                              something else.

- slurp and grim: screenshots (+ screen selection when screen sharing).

I will probably define a new variable `%sway-default-packages'
containing the above packages (minus waybar, ...).  WDYT?


Hilton Chain <hako <at> ultrarare.space> writes:
> Can `sway-configuration-bar' be optional?  In my case it's not used.
Yes indeed.  In the v6, I will try to make a few fields optional, and
also avoid empty groups in produced configuration file.


> Arnaud Daby-Seesaram <ds-ac <at> nanein.fr> writes:
>>>> The function @code{sway-configuration->file} defined below can be used
>>>> to provide the value for the @code{sway-configuration} field of
>>>> @code{greetd-wlgreet-sway-session}.
[...]
> That one can use your `sway-configuration' enables one to configure the
> inputs field declaratively to use another keyboard layout in the
> greeter.  It is a good feature.  But perhaps add the word “optionally”
> to make clear users do not have to provide a sway-configuration to the
> greeter.
Indeed; I will try to phrase this properly.

>> @lisp
>> (service home-sway-service-type
>>          (sway-configuration
>>           (gestures
>>            '((swipe:3:down . "move to scratchpad")
>>              (swipe:3:up   . "scratchpad show")))
>>           (outputs
>>            (list (sway-output
>>                   (identifier '*)
>>                   (bg (file-append guix-backgrounds
>>                      "\
>> /share/backgrounds/guix/guix-checkered-16-9.svg")))))))
>> @end lisp
>
> Now that I tested this code, I notice that SVG backgrounds work only
> if and only if librsvg is found.  Still, I think it is better this way
> with file-append.  Perhaps add a note to doc/guix.texi here that this
> librsvg must be installed or propagated in the packages field.
I will add a note in the next version of the doc, to hint towards the
two solutions to use a svg file: adding librsvg to the profile, or
computing the png and put it in the store using a "computed-file" in the
configuration (as in the second version of the patch).

>> @table @asis
>> @item @code{mode-name} (default @code{"default"})
>> Name of the mode.
>> @item  @code{keybindings} (default @code{'()})
>
> These fields are missing a colon “default: ”.  In other places you
> correctly write “default: ”.
Got it, thx!

Best regards,

-- 
Arnaud
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 220 days ago.

Previous Next


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