scripts/bash/usr-local-bin/thunderbird

27 lines
885 B
Plaintext
Raw Permalink Normal View History

2022-04-27 09:56:10 +02:00
#!/usr/bin/env bash
# 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
FlagsForThunderbird="--ProfileManager $@"
# Thunderbird (stable, beta) and signatures: https://releases.mozilla.org/pub/thunderbird/releases/
2023-05-18 11:25:47 +02:00
if [ -f ~/.local/thunderbird/thunderbird ]; then
2023-04-06 11:03:10 +02:00
~/.local/thunderbird/thunderbird $FlagsForThunderbird
2022-04-27 09:56:10 +02:00
# Fallback to global installation
2023-05-18 11:25:47 +02:00
elif [ -f /usr/bin/thunderbird-wayland ]; then
2023-04-06 11:03:10 +02:00
/usr/bin/thunderbird-wayland $FlagsForThunderbird
# Fallback to global installation
2023-05-18 11:25:47 +02:00
elif [ -f /usr/bin/thunderbird ]; then
2023-04-06 11:03:10 +02:00
/usr/bin/thunderbird $FlagsForThunderbird
2022-04-27 09:56:10 +02:00
# Fallback to flatpak, don't care if it doesn't exist
else
2023-04-06 11:03:10 +02:00
flatpak run org.mozilla.Thunderbird $FlagsForThunderbird
2022-04-27 09:56:10 +02:00
fi
set +x