This is a custom titlebar for electron and it supports windows, mac, and linux icons
Install simple-electron-titlebar with npm
npm install simple-electron-titlebar
Your main electron file
var titlebar = require('simple-electron-titlebar');
const createWindow = () => {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
titleBarStyle: 'hidden',
frame: false,
webPreferences: {
webviewTag: true,
preload: path.join(__dirname, 'preload.js'),
},
});
// Windows Titlebar (Win32 / Win64)
titlebar.win32()
// Mac Titlebar
titlebar.osx()
// Linux Titlebar
titlebar.linux()
// All Platform Support
titlebar.auto()
};
In your HTML file add
<div class="titlebar"></div>