Extending xdg-user-dirs

Cosimo Cecchi cosimo.cecchi at gmail.com
Thu Jan 29 04:45:36 PST 2015


Hey Bastien,

Picking this up again...

On Tue, Apr 1, 2014 at 10:42 PM, Bastien Nocera <hadess at hadess.net> wrote:

> Hey,
>
> On Mon, 2014-03-03 at 16:42 -0800, Cosimo Cecchi wrote:
>
> This diff to the spec isn't very clear:
>
> https://github.com/cosimoc/xdg-user-dirs/commit/29c89e42ec784fd00075b44cdfa459de7aecb1a9
>
> It's really not very clear that the extension files are in a
> sub-directory.
>

That is not the diff to the spec; there is unfortunately no "spec" for
this. That commit changes the manpage of the xdg-user-dirs-update command.
I added a commit to make the subdirectory more explicit.

>         Use cases:
> >         * An application (e.g. a sound recorder) wants to save a file
> >         in a subdirectory of $XDG_MUSIC_DIR. Another sound recorder
> >         wants to save files in the same subdirectory, and doesn't want
> >         to worry about the translations for each language to be in
> >         sync.
>
> How can sound recorder #2 rely on #1 being present, and having installed
> the directory file with the right name? Should common directories be
> shipped in xdg-users-dir?
>

[snip]

>
> We think that, to avoid inter-application dependency, and cluttering
> those top-level dirs with more slightly different versions of the same
> directory, we should ship the most common directories in xdg-users-dir
> directly.
>
> I hope this is clear enough so we can carry the discussion forward a
> little.
>

It is, thanks; I added a predefined directory now for backgrounds. I didn't
add other directories yet, but that's easy for people to do once the
infrastructure is in place.
One small complication is whether xdg-user-dirs-update should always create
those directories; I believe it shouldn't, and applications will have to
ensure those directories exist anyway. I changed the tool not to
automatically create those directories that are defined by .desktop files,
which I think makes sense.

Here's updated branches for my work:
https://github.com/cosimoc/xdg-user-dirs/tree/wip/user-directories
https://github.com/cosimoc/xdg-user-dirs-gtk/tree/wip/user-directories
https://github.com/cosimoc/glib/tree/wip/user-directories

Thanks,
Cosimo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20150129/2e165dba/attachment.html>


More information about the xdg mailing list