xdg icon indicating copy to clipboard operation
xdg copied to clipboard

Would you be interested in expanding this library to support other FreeDesktop specifications too?

Open xplshn opened this issue 1 year ago • 5 comments

Hi, great work, I was wondering if you'd be interested in expanding this library, to have multiple libraries held in this same repo, all of them being implementations of specifications under the XDG & FreeDesktop.org namespace.

It'd be lovely, as there's currently no suitable library that implements:

  • https://www.freedesktop.org/wiki/Specifications/trash-spec
  • https://www.freedesktop.org/wiki/Specifications/icon-theme-spec
  • https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec
  • https://www.freedesktop.org/wiki/Specifications/mime-apps-spec
  • https://www.freedesktop.org/wiki/Specifications/thumbnails

I only found https://github.com/rkoesters/xdg which implements some of these, and rather partially.

I'd be very much interested in helping out with the implementation of the "trash-spec" and the "desktop-entry-spec", as well as the "thumbnails" spec, I've already implemented desktop-entry parsing various times before, as well as thumbnail managing. So those are things I can try and implement myself.

Do let me know if there's any interest on this :)! I await your response! Regards!

xplshn avatar Jan 15 '25 06:01 xplshn

Hi @xplshn,

Sure, having more of the XDG related specs covered in the library would be great. I was actually planning on implementing some of them as well at some point.

The trash spec would be a good starting point as it is the most useful in my opinion. However, I would like to keep the package cross-platform and that will most likely be the tricky part.

adrg avatar Jan 15 '25 20:01 adrg

Hi @xplshn,

Sure, having more of the XDG related specs covered in the library would be great. I was actually planning on implementing some of them as well at some point.

The trash spec would be a good starting point as it is the most useful in my opinion. However, I would like to keep the package cross-platform and that will most likely be the tricky part.

The package itself can be kept crossplatform, but there are some specs which cannot really be translated into other environments, at that point, we'd be writing polyfills.

I think we could go with this idea I had:

  • Implement freedesktop specs
  • Implement the polyfills for WIN32, Plan 9 ; (if possible, not everything can be translated to win32)
  • And then implement a package which is cross platform, letting people choose the freedesktop package, the win32 package, the plan 9 package, or the one which merges all of them and is fully crossplatform.

What do you think?

This way the freedesktop specs would be correctly implemented, for their intended platform, and other people would be able to import that one, or the one that is crossplatform (and thus not really freedesktop compliant)

xplshn avatar Jan 15 '25 20:01 xplshn

@xplshn,

I apologize for the late response. I missed your last message somehow. Yes, I agree that we should start with the 'native' implementation and add implementations for the other operating systems afterwards, where possible.

adrg avatar Feb 03 '25 09:02 adrg

About trash specifications, I mentioned you guys in a project maintained by @babarot

  • https://github.com/babarot/gomi/issues/59

I think his project about managing file deletion should have xdg support

Let's create bridge, as your needs are close.

ccoVeille avatar Feb 10 '25 09:02 ccoVeille

Discussion continued in gomi

  • https://github.com/babarot/gomi/issues/59

So I created the following issue to track the xdg trash implementation suggestions

  • https://github.com/adrg/xdg/issues/113

ccoVeille avatar Feb 10 '25 20:02 ccoVeille