2024-06-05 08:34:43 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# Attempt to start the less annoying fork
|
|
|
|
if [ -f /var/lib/flatpak/exports/bin/io.github.tdesktop_x64.TDesktop ]; then
|
|
|
|
flatpak run io.github.tdesktop_x64.TDesktop "$@"
|
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/io.github.tdesktop_x64.TDesktop ]; then
|
|
|
|
flatpak run --user io.github.tdesktop_x64.TDesktop "$@"
|
|
|
|
# but if it's not installed, fallback to the official one
|
|
|
|
elif [ -f /usr/bin/telegram-desktop ]; then
|
|
|
|
/usr/bin/telegram-desktop "$@"
|
|
|
|
elif [ -f /var/lib/flatpak/exports/bin/org.telegram.desktop ]; then
|
2024-08-03 10:36:44 +02:00
|
|
|
flatpak run org.telegram.desktop "$@"
|
2024-06-05 08:34:43 +02:00
|
|
|
elif [ -f ~/.local/share/flatpak/exports/bin/org.telegram.desktop ]; then
|
|
|
|
flatpak run --user org.telegram.desktop "$@"
|
|
|
|
else
|
|
|
|
print "Telegram not found :)"
|
|
|
|
fi
|
|
|
|
set +x
|