Skip to content

Instantly share code, notes, and snippets.

@jtwebman
Created March 7, 2026 09:56
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).
  • Native window controls on Linux — Uses Electron's titleBarStyle: "hidden" with titleBarOverlay for native minimize/maximize/close buttons styled to match dark/light theme. No custom frameless window hacks needed.
  • Layout padding — Chat header actions and DiffPanel turn strip dynamically add right padding so buttons don't hide under the native window controls. Padding adjusts when the diff panel opens/closes.
  • 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.3-amd64.deb.

How to install

sudo dpkg -i release/T3-Code-0.0.3-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