add firefox XDG directory to search paths

This commit is contained in:
Matthew Broadway 2025-12-05 12:13:52 +00:00
parent 2f5663cd2f
commit 2c36263ad4
No known key found for this signature in database
GPG key ID: DDC0B82B6896B381

View file

@ -234,13 +234,16 @@ def _firefox_based_browser_settings(browser_name):
else: else:
flatpak_root = os.path.expanduser('~/.var/app') flatpak_root = os.path.expanduser('~/.var/app')
snap_root = os.path.expanduser('~/snap') snap_root = os.path.expanduser('~/snap')
config = _config_home()
browser_dirs = { browser_dirs = {
'firefox': [ 'firefox': [
os.path.join(config, 'mozilla/firefox'),
os.path.expanduser('~/.mozilla/firefox'), os.path.expanduser('~/.mozilla/firefox'),
os.path.join(flatpak_root, 'org.mozilla.firefox/.mozilla/firefox'), os.path.join(flatpak_root, 'org.mozilla.firefox/.mozilla/firefox'),
os.path.join(snap_root, 'firefox/common/.mozilla/firefox'), os.path.join(snap_root, 'firefox/common/.mozilla/firefox'),
], ],
'librewolf': [ 'librewolf': [
# librewolf does not follow the XDG specification yet: https://codeberg.org/librewolf/issues/issues/2682
os.path.expanduser('~/.librewolf'), os.path.expanduser('~/.librewolf'),
os.path.join(flatpak_root, 'io.gitlab.librewolf-community/.librewolf'), os.path.join(flatpak_root, 'io.gitlab.librewolf-community/.librewolf'),
# not published on snapcraft # not published on snapcraft