GNU bug report logs -
#72714
[PATCH] home: services: Add 'home-sway-service-type'.
Previous Next
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 #89 received at 72714 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
"pelzflorian (Florian Pelz)" <pelzflorian <at> pelzflorian.de> writes:
> Arnaud Daby-Seesaram <ds-ac <at> nanein.fr> writes:
>>> Normally scm->go is probably unneeded here, because guile will find the compiled
>>> .go file. However program-file seems to add --no-auto-compile. Not
>>> sure now.
>> I do not know why the flag --no-auto-compile is passed either.
>>
>
> I am not sure if program-file or scheme-file should be preferred.
I think that in our use case, program-file is better, because it does
not require to call Guile explicitly in the Sway configuration (all we
care about is that the serialised script "behaves like a menu program").
>>> Another more thing. I try (bar (sway-bar)), but it prints an empty bar
>>> configuration to .config/sway/config. In patch 6, you added
>>> no-serialization. Did this break it?
>>
>> Hmmm, I am not sure.
>> It is normal that `(sway-bar)' is an empty bar configuration (as all bar
>> fields are now optional or empty by default).
>
> Ooops, the identifier is not written, of course.
>
> (bar (sway-bar
> (position 'top)))
>
> is fine. Not sure what defaults are best.
Yes, this is arbitrary in my code. Rationale behind my choice:
At first, I wanted to make the default value match that of the default
Sway configuration file. However, this would force some fields to be
mandatory (namely status-command, colors and position). As users may
not want to specify these fields in their Sway configuration,
I preferred to make everything optional.
> Arnaud Daby-Seesaram <ds-ac <at> nanein.fr> writes:
>>>> (receive (from to pid)
>>>> ((@@ (ice-9 popen) open-process) OPEN_BOTH wmenu)
>>>
>>> Better use @ instead of @@.
>> Unfortunately, `open-process' is not exported in `(ice-9 popen)', so I
>> kept @@.
>>
>
> Not sure if exported open-pipe* would be better. open-process is
> checked in guile tests, but not exported, that is right. But maybe a
> red flag not to use it.
I first tried to use (open-pipe wmenu OPEN_BOTH). However, I needed
to close the port to wmenu before reading its output. I do not know how
to do that with `open-pipe'.
Best,
--
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.