From f67bcd793194789ab78452f9d4f3133ce2517ee1 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 8 Aug 2026 21:26:39 +0200 Subject: typora-bin: add version 1.14.9 Binary repack of upstream's official Linux x86_64 tarball; Typora is closed source, so this is not a build from source. Uses the versioned tarball on downloads.typora.io rather than the version-agnostic Typora-linux-x64.tar.gz, which serves whatever build is current and would go md5-stale on every upstream release. Launch through a wrapper instead of a symlink to the binary: it enables Electron's Ozone Wayland backend when a Wayland session is detected and leaves the X11 default alone otherwise, so one package works in both. Override with TYPORA_OZONE=wayland|x11. Upstream's bundled updater is dropped; it would overwrite the tree in /opt behind pkgtool's back. Co-Authored-By: Claude Opus 5 --- typora-bin/typora.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 typora-bin/typora.sh (limited to 'typora-bin/typora.sh') diff --git a/typora-bin/typora.sh b/typora-bin/typora.sh new file mode 100644 index 0000000..9ecdf48 --- /dev/null +++ b/typora-bin/typora.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# Launcher for the bundled Typora Electron binary. +# +# Under Wayland, Electron still defaults to XWayland unless told otherwise, +# which costs sharp HiDPI scaling and native input methods. Auto-enable the +# Ozone Wayland backend when a Wayland session is detected, and stay on the +# default (X11) path otherwise, so one package works in both sessions. +# +# Override either way with TYPORA_OZONE=wayland or TYPORA_OZONE=x11. + +APPDIR=/opt/Typora-linux-x64 + +ozone=${TYPORA_OZONE:-auto} +if [ "$ozone" = auto ]; then + if [ -n "$WAYLAND_DISPLAY" ]; then + ozone=wayland + else + ozone=x11 + fi +fi + +if [ "$ozone" = wayland ]; then + exec "$APPDIR/Typora" --enable-features=UseOzonePlatform \ + --ozone-platform=wayland "$@" +fi + +exec "$APPDIR/Typora" "$@" -- cgit v1.2.3