This uses the same method as cosmic/settings to determine the default terminal application. This is more of a quick fix for the moment, because it does not yet adhere to the rules of https://github.com/Vladimir-csp/xdg-terminal-exec
Closes: #922, #924, #925, #928
My original patch, #891, mishandled Exec keys. The ordering of arguments
matters for the keys, such as for Flatpak apps.
Opening multiple selected paths should:
* Launch one app that supports all of the file paths e.g. an image
viewer that allows cycling through the selected images
* Launch multiple instances of an app if the app doesn't handle multiple
URLs, such as nsxiv
* Launch different apps for a heterogeneous mix of URLs while taking
into account the two rules above. For example, launching a mix of
paths of images, videos, and text should open the correct apps
Closes: #258
[lexical_sort](https://github.com/Aloso/lexical-sort) is currently
unmaintained. The author recommends switching to the `icu` crate which
is maintained by the Unicode Consortium.