2022-04-04 15:45:55 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2022-04-19 21:32:18 +03: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.
|
|
|
|
|
2022-04-04 15:45:55 +03:00
|
|
|
set -x
|
2022-04-16 16:01:07 +03:00
|
|
|
export MOZ_ENABLE_WAYLAND=1
|
2022-04-20 08:32:55 +03:00
|
|
|
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 12:25:47 +03:00
|
|
|
if [ -f ~/.local/firefox/firefox ]; then
|
2023-04-06 12:03:10 +03:00
|
|
|
~/.local/firefox/firefox $FlagsForFirefox
|
2022-07-05 15:25:41 +03:00
|
|
|
# Fallback to global wayland installation
|
2023-05-18 12:25:47 +03:00
|
|
|
elif [ -f /usr/bin/firefox-wayland ]; then
|
2023-04-06 12:03:10 +03:00
|
|
|
/usr/bin/firefox-wayland $FlagsForFirefox
|
2022-04-20 08:32:55 +03:00
|
|
|
# Fallback to global installation
|
2023-05-18 12:25:47 +03:00
|
|
|
elif [ -f /usr/bin/firefox ]; then
|
2023-04-06 12:03:10 +03:00
|
|
|
/usr/bin/firefox $FlagsForFirefox
|
2022-04-20 08:32:55 +03:00
|
|
|
# Fallback to flatpak, don't care if it doesn't exist
|
|
|
|
else
|
2023-04-06 12:03:10 +03:00
|
|
|
flatpak run org.mozilla.firefox $FlagsForFirefox
|
2022-04-20 08:32:55 +03:00
|
|
|
fi
|
|
|
|
|
2022-04-04 15:45:55 +03:00
|
|
|
set +x
|