wl-clipboard icon indicating copy to clipboard operation
wl-clipboard copied to clipboard

Use Mac OS X specifics

Open bugaevc opened this issue 2 years ago • 0 comments

Currently wl-clipboard doesn't do anything OS X / Darwin-specific when running on that platform, but we should!

  • [ ] Apparently readlink("/dev/fd/...") doesn't work too well there, we should use the semi-private proc_pidfdinfo() API instead.
  • [ ] For mapping a file extension to a MIME type, we should use Cocoa APIs (such as UTTypeCreatePreferredIdentifierForTag or kCFURLTypeIdentifierKey) instead of reading /etc/mime.types.
  • [ ] Can we do some similar Cocoa magic to infer file type based on its contents?
  • [ ] Research whether there is a better Darwin-specific method to create an anonymous file

bugaevc avatar Apr 07 '23 11:04 bugaevc