@devries-cameron20 / t3code Mirror · read-only / commits / 0a88719a3a
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 25, 07:30 UTC

Improve Linux desktop identity packaged builds (#1201)

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Ellie Gummere committed Mar 31, 2026 at 23:07 UTC 0a88719a3abdf80a01096e6c324aa1d3b5650920
2 files changed +20 -1
apps/desktop/src/main.ts
+13
@@ -66,6 +66,8 @@ const ROOT_DIR = Path.resolve(__dirname, "../../..");
66 const isDevelopment = Boolean(process.env.VITE_DEV_SERVER_URL);
67 const APP_DISPLAY_NAME = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Alpha)";
68 const APP_USER_MODEL_ID = "com.t3tools.t3code";
69 +const LINUX_DESKTOP_ENTRY_NAME = isDevelopment ? "t3code-dev.desktop" : "t3code.desktop";
70 +const LINUX_WM_CLASS = isDevelopment ? "t3code-dev" : "t3code";
71 const USER_DATA_DIR_NAME = isDevelopment ? "t3code-dev" : "t3code";
72 const LEGACY_USER_DATA_DIR_NAME = isDevelopment ? "T3 Code (Dev)" : "T3 Code (Alpha)";
73 const COMMIT_HASH_PATTERN = /^[0-9a-f]{7,40}$/i;
@@ -80,6 +82,9 @@ const DESKTOP_UPDATE_CHANNEL = "latest";
82 const DESKTOP_UPDATE_ALLOW_PRERELEASE = false;
83
84 type DesktopUpdateErrorContext = DesktopUpdateState["errorContext"];
85 +type LinuxDesktopNamedApp = Electron.App & {
86 + setDesktopName?: (desktopName: string) => void;
87 +};
88
89 let mainWindow: BrowserWindow | null = null;
90 let backendProcess: ChildProcess.ChildProcess | null = null;
@@ -263,6 +268,10 @@ function captureBackendOutput(child: ChildProcess.ChildProcess): void {
268
269 initializePackagedLogging();
270
271 +if (process.platform === "linux") {
272 + app.commandLine.appendSwitch("class", LINUX_WM_CLASS);
273 +}
274 +
275 function getDestructiveMenuIcon(): Electron.NativeImage | undefined {
276 if (process.platform !== "darwin") return undefined;
277 if (destructiveMenuIconCache !== undefined) {
@@ -715,6 +724,10 @@ function configureAppIdentity(): void {
724 app.setAppUserModelId(APP_USER_MODEL_ID);
725 }
726
727 + if (process.platform === "linux") {
728 + (app as LinuxDesktopNamedApp).setDesktopName?.(LINUX_DESKTOP_ENTRY_NAME);
729 + }
730 +
731 if (process.platform === "darwin" && app.dock) {
732 const iconPath = resolveIconPath("png");
733 if (iconPath) {
scripts/build-desktop-artifact.ts
+7 -1
@@ -502,8 +502,14 @@ const createBuildConfig = Effect.fn("createBuildConfig")(function* (
502 if (platform === "linux") {
503 buildConfig.linux = {
504 target: [target],
505 + executableName: "t3code",
506 icon: "icon.png",
507 category: "Development",
508 + desktop: {
509 + entry: {
510 + StartupWMClass: "t3code",
511 + },
512 + },
513 };
514 }
515
@@ -648,7 +654,7 @@ const buildDesktopArtifact = Effect.fn("buildDesktopArtifact")(function* (
654 yield* fs.copy(stageResourcesDir, path.join(stageAppDir, "apps/desktop/prod-resources"));
655
656 const stagePackageJson: StagePackageJson = {
651 - name: "t3-code-desktop",
657 + name: "t3code",
658 version: appVersion,
659 buildVersion: appVersion,
660 t3codeCommitHash: commitHash,