Created
December 11, 2025 03:08
-
-
Save abihf/d615e25e56f6856c9aeaa8ff07929803 to your computer and use it in GitHub Desktop.
xdg-open using handler and app2unit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| url="${1}" | |
| mime="$(handlr mime --json "${url}" | jq -r '.[0].mime')" | |
| handler="$(handlr get --json "${mime}" | jq -r '.handler')" | |
| exec app2unit "${handler}" "${url}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment