Skip to content

Build your personal knowledge base with Trilium Notes

feat(electron): set overlay information at runtime

Elian Doran60192977c9e8
diff --git a/src/public/app/desktop.js b/src/public/app/desktop.js
index 835624d359..313bee0348 100644
--- a/src/public/app/desktop.js
+++ b/src/public/app/desktop.js
@@ -30,8 +30,7 @@ bundleService.getWidgetBundlesByParent().then(async widgetBundles => {
glob.setupGlobs();
if (utils.isElectron()) {
- utils.dynamicRequire('electron').ipcRenderer.on('globalShortcut',
- async (event, actionName) => appContext.triggerCommand(actionName));
+ initOnElectron();
}
macInit.init();
@@ -43,3 +42,18 @@ noteAutocompleteService.init();
if (utils.isElectron()) {
electronContextMenu.setupContextMenu();
}
+
+function initOnElectron() {
+ const electron = utils.dynamicRequire('electron');
+ electron.ipcRenderer.on('globalShortcut', async (event, actionName) => appContext.triggerCommand(actionName));
+
+ // Update the native title bar buttons.
+ const electronRemote = utils.dynamicRequire("@electron/remote");
+ const currentWindow = electronRemote.getCurrentWindow();
+ currentWindow.setTitleBarOverlay({
+ color: "red",
+ symbolColor: "white"
+ });
+
+ console.log("Electron initialized.");
+}
\ No newline at end of file
diff --git a/src/public/stylesheets/theme-next.css b/src/public/stylesheets/theme-next.css
index 22556aba91..8c3bf85369 100644
--- a/src/public/stylesheets/theme-next.css
+++ b/src/public/stylesheets/theme-next.css
@@ -20,7 +20,7 @@
:root {
/* --main-font-family: "Noto Sans", sans-serif; */
- --main-font-family: "Ubuntu Sans", sans-serif;
+ --main-font-family: "Segoe UI", sans-serif;
/* --main-font-family: "Ubuntu", sans-serif; */
/* --main-font-family: "Nunito", sans-serif; */
/* --main-font-family: "Inter", sans-serif; */