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: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
To: Arnaud Daby-Seesaram <ds-ac <at> nanein.fr>
Cc: Hilton Chain <hako <at> ultrarare.space>, Ludovic Courtès <ludo <at> gnu.org>, 72714 <at> debbugs.gnu.org
Subject: [bug#72714] [PATCH] home: services: Add 'home-sway-service-type'.
Date: Thu, 03 Oct 2024 14:41:48 +0200
Hello Arnaud.

Arnaud Daby-Seesaram <ds-ac <at> nanein.fr> writes:
> "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:
>> Perhaps for more hackability, we could deviate from upstream and put in
>> a call to guile with a Scheme script in a computed-file that opens a
>> pipe to/from wmenu and does the same as dmenu_path without cache only on
>> ~/.guix-home/profile/bin.
>
> Yes indeed.  Do you think that the Guile script should replace all of
> "$menu", or just the dmenu_path part?
>

All of "$menu", because it looks nicer?  But I should not imply that
such deviation from upstream were necessary for getting your patch in.

Basically my issue was that dmenu_path did not work.

Indeed stest is part of the dmenu package, so when dmenu is installed to
the profile, dmenu_path would work.  So a more upstream conformant
solution would be to just add the dmenu package to sway’s packages.

However, dmenu_path’s cache means that if we used dmenu_path like
upstream, it would never recognize changes to the installed packages.
OpenBSD opted for wmenu_path which is like dmenu_path without cache
and a guile script seems more appropriate for Guix’ defaults.


> On this topic, do you know if there is a built-in way to write
> `find -maxdepth 1 ...' in Guile (without calling `readdir' manually)?

scandir from the (ice-9 ftw) module, I think.


>> only on ~/.guix-home/profile/bin.
>
> What is the rationale for restricting the menu to this directory (and
> not all directories in
>   (filter directory-exists? (string-split (getenv "PATH") #\:))
> ?
>

All my graphical applications are in the home profile and non-graphical
programs will not be used and clutter wmenu.  Do others put graphical
apps in the system profile?  Perhaps so.  But then non-graphical
coreutils would be in the wmenu as well.  Hmm I am not sure and would be
fine with either.


>> Or change the dmenu_path program with `substitute' to use the absolute
>> file-name of stest.
>
> I think that the Guile script might be simpler.
>
> By `substitute', do you mean in the package definition?

Yes, the dmenu package definition.

> This does not
> seem necessary, as people installing dmenu have stest in their profile.
>

If dmenu were installed in the sway-packages, substitute would not be needed.


> Do you want me to send a v8 with the above fixes, or should I wait until
> we change the content of the "$menu" variable?

It can wait.

Regards,
Florian




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.