Skip to content

Instantly share code, notes, and snippets.

@jtwebman
Last active March 10, 2026 16:37
Show Gist options
  • Select an option

  • Save jtwebman/30990d3a3c222aa71a6bd4582ccb0164 to your computer and use it in GitHub Desktop.

Select an option

Save jtwebman/30990d3a3c222aa71a6bd4582ccb0164 to your computer and use it in GitHub Desktop.
T3 Code Desktop — Linux / WSL2 .deb Support

T3 Code Desktop — Linux / WSL2 .deb Support

What changed

This branch adds .deb packaging for T3 Code Desktop so it can run natively on Linux (including WSL2 via WSLg).

Key changes:

  • .deb build targetbuild-desktop-artifact.ts now supports --platform linux --target deb, generating properly sized icons at build time via ImageMagick and including deb post-install/remove scripts.
  • CLI wrappers — Installing the .deb creates t3code and t3-code commands in /usr/local/bin that launch the app in the background (won't block your terminal).
  • WSL2 custom title bar — On WSL2, the app uses frame: false with a custom in-app title bar (WslTitleBar) rendered above all content (including the sidebar). This avoids WSLg's Weston compositor ignoring GTK dark theme hints for server-side decorations. Minimize/maximize/close buttons are built into the custom title bar.
  • Platform-aware window chrome — macOS uses hiddenInset with traffic lights, Windows uses titleBarOverlay, native Linux gets the default OS frame, and WSL2 gets the custom frameless title bar.
  • Layout architecture — Root layout wraps everything in a h-dvh flex container. The WSL title bar sits at the top, content renders in a #app-content div with contain: paint. Sidebar uses normal flex layout (not fixed positioning). All portals render into #app-content so overlays respect the title bar.
  • Wayland/Ozone flags — The .desktop launcher and CLI wrappers include --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto --gtk-version=4 for proper Wayland support under WSLg.

How to build

Prerequisites: bun, imagemagick (convert command), fpm (installed by electron-builder).

git clone https://github.com/jtwebman/t3code.git
cd t3code
git checkout support-deb-build
bun install
bun run scripts/build-desktop-artifact.ts -- --platform linux --target deb

The .deb lands in release/T3-Code-0.0.9-amd64.deb.

How to install

sudo dpkg -i release/T3-Code-0.0.9-amd64.deb
sudo apt install -f -y  # if there are missing deps like libnotify4

Then launch with t3code or t3-code from your terminal.

Dark mode

WSLg's Weston compositor ignores GTK theme hints for server-side window decorations, so the outer window frame color is controlled by your GTK theme env var. Add this to your ~/.bashrc or ~/.zshrc:

# Dark mode
export GTK_THEME=Adwaita:dark

# Or for light mode
export GTK_THEME=Adwaita

The app content itself follows the in-app theme setting (defaults to system preference).

Diff

https://github.com/pingdotgg/t3code/compare/main...jtwebman:support-deb-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment