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


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

From: Arnaud Daby-Seesaram <ds-ac <at> nanein.fr>
To: "pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de>
Cc: Hilton Chain <hako <at> ultrarare.space>,
 Ludovic Courtès <ludo <at> gnu.org>, 72714 <at> debbugs.gnu.org
Subject: Re: [PATCH] home: services: Add 'home-sway-service-type'.
Date: Wed, 02 Oct 2024 22:49:51 +0200
[Message part 1 (text/plain, inline)]
Hi Florian,

"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:
> Arnaud Daby-Seesaram writes:
>> +(define %sway-default-variables
>> +  `((mod   . "Mod4")
>> +    (left  . "h")
>> +    (down  . "j")
>> +    (up    . "k")
>> +    (right . "l")
>> +    (term  . ,(file-append foot "/bin/foot"))
>> +    (menu  . ,#~(string-append
>> +                 #$dmenu "/bin/dmenu_path | \\\n    "
>> +                 #$wmenu "/bin/wmenu | \\\n    "
>> +                 #$findutils "/bin/xargs \\\n    "
>> +                 #$sway "/bin/swaymsg exec --"))))
>
> After I added new packages to home-environment’s packages field,
> dmenu_path does not list newly installed packages for me, because it
> is a shell script which needs a program called stest in PATH.
>
> Now the wmenu_path I talked about earlier appears to be an invention
> by the OpenBSD people that does not need stest [1].
>
> 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?

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

> 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") #\:))
?

> 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?  This does not
seem necessary, as people installing dmenu have stest in their profile.


"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:
> There is no bg anymore.
> [...]
> Should be point-y.

The point-issue was introduced in the v6.  I apologise for those issues
that I bring in new patches...  Thank you for catching them!

In my local files, I have also switched from using `open-output-file' to
`call-with-output-file'¹ and reduced the number of redundant calls to
`make-string'.
                              ¹: in previous patches, I never called
                              `close-port'.

"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:
> Hi Arnaud.  I still have not tested nor reviewed all features, but
> some comments:

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?


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.