fix: fall back to XDG MIME browser handler (#6424)

This commit is contained in:
Kushida
2026-07-29 17:15:27 -04:00
committed by GitHub
parent e39a275f5a
commit 6593403345
2 changed files with 27 additions and 1 deletions
+3
View File
@@ -4,6 +4,9 @@
# omarchy:args=[url]
default_browser=$(env -u BROWSER xdg-settings get default-web-browser)
if [[ -z $default_browser ]]; then
default_browser=$(xdg-mime query default x-scheme-handler/https)
fi
browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' {~/.local,~/.nix-profile,/usr}/share/applications/$default_browser 2>/dev/null | head -1)
if $browser_exec --help 2>/dev/null | grep -q MOZ_LOG; then