diff options
| author | Danilo M. <danix@danix.xyz> | 2026-08-08 21:26:39 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-08-08 21:26:39 +0200 |
| commit | f67bcd793194789ab78452f9d4f3133ce2517ee1 (patch) | |
| tree | a165993055fd77f46cd84ff31837d935a8a2b139 /typora-bin/typora.sh | |
| parent | c99d4e7047f2242a7aeb3585d200a3e0a2b91f01 (diff) | |
| download | my-slackbuilds-f67bcd793194789ab78452f9d4f3133ce2517ee1.tar.gz my-slackbuilds-f67bcd793194789ab78452f9d4f3133ce2517ee1.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'typora-bin/typora.sh')
| -rw-r--r-- | typora-bin/typora.sh | 27 |
1 files changed, 27 insertions, 0 deletions
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" "$@" |
