scripts/bash/usr-local-bin/firefox

28 lines
921 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
2022-04-19 20:32:18 +02:00
# I always want to see the profile manager, whether it's my first run or
# not and I probably have to micromanage wayland enabling everywhere.
# I cannot use the Flatpak as it doesn't support smartcards.
set -x
export MOZ_ENABLE_WAYLAND=1
FlagsForFirefox="--ProfileManager $@"
# Firefox (stable, beta) and signatures: https://releases.mozilla.org/pub/firefox/releases/
# Developer edition (and signatures): https://releases.mozilla.org/pub/devedition/releases/
2023-05-18 11:25:47 +02:00
if [ -f ~/.local/firefox/firefox ]; then
2023-04-06 11:03:10 +02:00
~/.local/firefox/firefox $FlagsForFirefox
# Fallback to global wayland installation
2023-05-18 11:25:47 +02:00
elif [ -f /usr/bin/firefox-wayland ]; then
2023-04-06 11:03:10 +02:00
/usr/bin/firefox-wayland $FlagsForFirefox
# Fallback to global installation
2023-05-18 11:25:47 +02:00
elif [ -f /usr/bin/firefox ]; then
2023-04-06 11:03:10 +02:00
/usr/bin/firefox $FlagsForFirefox
# Fallback to flatpak, don't care if it doesn't exist
else
2023-04-06 11:03:10 +02:00
flatpak run org.mozilla.firefox $FlagsForFirefox
fi
set +x