std.mime.mime_default_app

std.mime

mime_default_app(m_type) -> app

Find the default application for a MIME type

Searches XDG mimeapps.list files for the default .desktop entry associated with the given MIME type. Checks user, local, system, and XDG config locations in order of priority.