How to use the electron-util.appMenu function in electron-util

To help you get started, we’ve selected a few electron-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sindresorhus / caprine / source / menu.ts View on Github external
app.relaunch();
				app.quit();
			}
		},
		{
			label: 'Delete App Data',
			click() {
				shell.moveItemToTrash(app.getPath('userData'));
				app.relaunch();
				app.quit();
			}
		}
	];

	const macosTemplate: MenuItemConstructorOptions[] = [
		appMenu([
			{
				label: 'Caprine Preferences',
				submenu: preferencesSubmenu
			},
			{
				label: 'Messenger Preferences…',
				accelerator: 'Command+,',
				click() {
					sendAction('show-preferences');
				}
			},
			{
				type: 'separator'
			},
			...switchItems
		]),
github timche / gmail-desktop / src / main / menu.ts View on Github external
export function updateMenu(): void {
  const template: MenuItemConstructorOptions[] = [
    appMenu(),
    {
      label: 'Accounts',
      submenu: [
        ...generateAccountsMenuItems(),
        {
          type: 'separator'
        },
        {
          label: 'Add Account',
          click: () => {
            createAddAccountWindow()
          }
        }
      ]
    },
    {
github wulkano / kap / main / menus.js View on Github external
openFileItem,
  exportHistoryItem,
  {
    type: 'separator'
  },
  preferencesItem,
  {
    type: 'separator'
  },
  {
    role: 'quit',
    accelerator: 'Command+Q'
  }
];

const appMenuItem = appMenu([preferencesItem]);

appMenuItem.submenu[0] = aboutItem;

const applicationMenuTemplate = [
  appMenuItem,
  {
    role: 'fileMenu',
    submenu: [
      openFileItem,
      {
        type: 'separator'
      },
      {
        label: 'Save Original…',
        id: 'saveOriginal',
        accelerator: 'Command+S',