Skip to content

Build your personal knowledge base with Trilium Notes

build: Add StartupWMClass to deb build

Elian Doran0768a2a0a30d
diff --git a/bin/deb-options.json b/bin/deb-options.json
deleted file mode 100644
index 86531cc48e..0000000000
--- a/bin/deb-options.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "src": "dist/trilium-linux-x64",
- "dest": "dist/",
- "compression": "xz",
- "name": "trilium",
- "productName": "Trilium Notes",
- "genericName": "Note taker",
- "description": "Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.",
- "sections": "misc",
- "maintainer": "[email protected]",
- "homepage": "https://github.com/zadam/trilium",
- "bin": "trilium",
- "icon": "dist/trilium-linux-x64/icon.png",
- "categories": [ "Office" ]
-}
diff --git a/bin/electron-forge/desktop.ejs b/bin/electron-forge/desktop.ejs
new file mode 100644
index 0000000000..f803f37b21
--- /dev/null
+++ b/bin/electron-forge/desktop.ejs
@@ -0,0 +1,12 @@
+[Desktop Entry]
+<% if (productName) { %>Name=<%= productName %>
+<% } %><% if (description) { %>Comment=<%= description %>
+<% } %><% if (genericName) { %>GenericName=<%= genericName %>
+<% } %><% if (name) { %>Exec=<%= name %> %U
+Icon=<%= name %>
+<% } %>Type=Application
+StartupNotify=true
+<% if (productName) { %>StartupWMClass=<%= productName %>
+<% } if (categories && categories.length) { %>Categories=<%= categories.join(';') %>;
+<% } %><% if (mimeType && mimeType.length) { %>MimeType=<%= mimeType.join(';') %>;
+<% } %>
\ No newline at end of file
diff --git a/forge.config.cjs b/forge.config.cjs
index 91730ed432..2f0d64c4ba 100644
--- a/forge.config.cjs
+++ b/forge.config.cjs
@@ -44,6 +44,7 @@ module.exports = {
config: {
options: {
icon: "./images/app-icons/png/128x128.png",
+ desktopTemplate: path.resolve("./bin/electron-forge/desktop.ejs")
}
}
},