Telegram Desktop
Telegram Desktop is Telegram's cross-platform client, and unlike what the name implies, it mostly works well on phones.
Installation
Telegram Desktop is available from Alpine's community repository and can as such be installed directly via apk:
# apk add telegram-desktop
Tweaks
Sub-100% scaling
By default, Telegram Desktop may overflow and have some of its UI elements appear off screen. This can be worked around by settings a sub-100% UI scale. Unfortunately, Telegram Desktop's in-app settings do not allow for this, however the command-line switch -scale is offered for setting an arbitrary scale, for example:
$ telegram-desktop -scale 80
This will set the UI scale to 80%.
To make this permanent, you can copy the .desktop file into your home (this is to ensure that updates don't overwrite your changes):
$ cp /usr/share/applications/org.telegram.desktop.desktop ~/.local/share/applications/
Then open ~/.local/share/applications/org.telegram.desktop.desktop in your text editor of choice and edit the Exec line to include -scale 80 (or whatever scale works better for you). It should look something like this:
Exec=telegram-desktop -scale 80 -- %u
Disabling window frame
By default, Telegram Desktop have strange window frame. If you want to add some extra space to content, you can disable it by enabling "Use Qt window frame" in advanced section of settings and then reopen telegram with environment variable `QT_WAYLAND_DISABLE_WINDOWDECORATION=1`
$ QT_WAYLAND_DISABLE_WINDOWDECORATION=1 telegram-desktop
This will disable window frame.
To make this permanent, you can copy the .desktop file into your home (this is to ensure that updates don't overwrite your changes):
$ cp /usr/share/applications/telegram-desktop.desktop ~/.local/share/applications/
Then open ~/.local/share/applications/telegram-desktop.desktop in your text editor of choice and edit the Exec line to include -scale 80 (or whatever scale works better for you). It should look something like this:
Exec=env QT_WAYLAND_DISABLE_WINDOWDECORATION=1 telegram-desktop -- %u
The window is not centered
By default, Telegram Desktop seems to launch the X11/XWayland version. This version causes some components to be off-screen. To launch telegram-desktop using Wayland run:
$ QT_QPA_PLATFORM=wayland telegram-desktop
To make this permanent, you can copy the .desktop file into your home (this is to ensure that updates don't overwrite your changes):
$ cp /usr/share/applications/telegram-desktop.desktop ~/.local/share/applications/
Then open ~/.local/share/applications/telegram-desktop.desktop in your text editor of choice and edit the Exec line to start Telegram with the env command which allows running a program with a modified environment. It should look something like this:
Exec=env QT_QPA_PLATFORM=wayland telegram-desktop -- %u
Notifications make Telegram appear over other apps in Phosh
You can work around this by disabling "Draw attention to the window" under "Notifications and Sounds" in Settings.
Native notifications
This setting seems to not appear and be permanently active when using postmarketOS Edge with Phosh at the time of writing
By default Telegram Desktop uses its own notification system where notifications appear as windows. This doesn't work great in Phosh (and presumably other phone interfaces) and will result in flickering and the currently viewed application being switched out when a notification arrives. For a better experience you can enable native notifications in Settings -> Notifications -> Use native notifications (right at the bottom of the page). This will make notifications appear as regular notifications in your user interface (if it supports them).