Le Fri, Nov 10, 2023 at 10:05:45AM +0000, Stuart Henderson a écrit :
> On 2023/11/10 10:14, Landry Breuil wrote:
> > Le Fri, Nov 10, 2023 at 08:44:49AM +0000, Stuart Henderson a écrit :
> > > On 2023/11/09 17:50, Landry Breuil wrote:
> > > > now with 100%+ more parse_line_like_wordexp_does() manually rolled
> > > > (thanks tb!)... and 100%+ more malloc return values checked. with that
> > > > horror i'm able to run swayidle with this in .config/swayidle/config:
> > >
> > > The bits that I've looked at seem a lot better. Some small feedback,
> > >
> > > static char *get_config_path(void) {
> > > +#if HAVE_WORDEXP
> > > static char *config_paths[3] = {
> > > "$XDG_CONFIG_HOME/swayidle/config",
> > > "$HOME/.swayidle/config",
> > > @@ -999,10 +1004,123 @@ static char *get_config_path(void) {
> > > free(path);
> > > }
> > > }
> > > +#else
> > >
> > > TBH I'd just delete the wordexp version of this part, there seems no
> > > benefit to using wordexp here. Unless being able to execute backtick
> > > commands embedded in XDG_CONFIG_HOME is considered a useful feature :)
> >
> > the idea behind 'keeping it' is only to be able to upstream it without
> > too much intrusion, eg
> > https://github.com/swaywm/swayidle/pull/154 &
> > https://github.com/swaywm/swaylock/pull/325
>
> Oh I would suggest upstreaming that too, surely they don't need wordexp
> in that part either?since upstream agreed that "Our wordexp usage is indeed an abuse I'd say" and the config file lookup was already cleaned up from sway in https://github.com/swaywm/sway/commit/1d62d6bf i've backported that part to both my PRs - new version of the ports attached to match with the status of that. testing welcome, feedback on the bsdauth part, and oks too ! Landry
swaylock+swayidle_3.tgz
Description: application/tar-gz
