opencode-desktop: fix desktop file name and StartupWMClass to match app_id
The Electron app sets its application ID to 'ai.opencode.desktop' via app.setAppUserModelId(), but the nixpkgs desktop file used name='opencode-desktop' with StartupWMClass='OpenCode'. This mismatch caused desktop environments (especially ChromeOS Crostini/sommelier-rs) to fail associating the running window with the launcher icon. Fix both values to match the app_id set by the upstream Electron app, aligning with the electron-builder config which already generates the desktop file as 'ai.opencode.desktop.desktop' with the correct StartupWMClass. Assisted-by: opencode <model-gateway/opencode/deepseek-v4-flash-free>
This commit is contained in:
@@ -124,11 +124,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
desktopItems = lib.optional stdenvNoCC.hostPlatform.isLinux (makeDesktopItem {
|
||||
name = "opencode-desktop";
|
||||
name = "ai.opencode.desktop";
|
||||
desktopName = "OpenCode";
|
||||
exec = "opencode-desktop %U";
|
||||
icon = "opencode-desktop";
|
||||
startupWMClass = "OpenCode";
|
||||
startupWMClass = "ai.opencode.desktop";
|
||||
categories = [ "Development" ];
|
||||
mimeTypes = [ "x-scheme-handler/opencode" ];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user