<commit_before>'use strict';

const {
	app,
	BrowserWindow, 
	Menu
} = require('electron');

const util = require('./util');

const MENU_SEPARATOR = { type: 'separator' };

module.exports = {
	init() {
		this.createMenu();
	},
	
	createMenu() {
		this.template = [
			{
				label: 'Electron Icon',
				submenu: [
					{ label: 'Quit Electron Icon', accelerator: 'CommandOrControl+Q', click: () => app.quit() }
				]
			},
			{
				label: 'File',
				submenu: [
					{ label: 'Close Window', accelerator: 'CommandOrControl+W', role: 'close' },
					MENU_SEPARATOR,
					{ label: 'Export Open Windows As PNGs', accelerator: 'CommandOrControl+P', click: () => util.captureIcons() },
					{ label: 'Create Icons From PNGs', accelerator: 'CommandOrControl+I', click: () => util.createIcons() },
					{ label: 'Export PNGs and Create Icons', accelerator: 'Shift+CommandOrControl+I', click: () => util.captureAndCreateIcons() }
				]
			},
			{
				label: 'View',
				submenu: [
					{ label: 'Reload', accelerator: 'CommandOrControl+R', click: () => BrowserWindow.getFocusedWindow().reload() },
					{ label: 'Reload All', accelerator: 'Shift+CommandOrControl+R', click: () => util.reloadWindows() }
				]
			},
			{
				label: 'Window',
				submenu: [
					{ label: 'Minimize', accelerator: 'CommandOrControl+M', role: 'minimize' }
				]
			},
			{
				label: 'Debug',
				submenu: [
					{ label: 'Log Window Bounds', accelerator: 'CommandOrControl+L', click: () => util.logWindowBounds() },
					{ label: 'Toggle DevTools', accelerator: 'Alt+CommandOrControl+I', click: () => BrowserWindow.getFocusedWindow().toggleDevTools() }
				]
			}
		];
		
		const menu = Menu.buildFromTemplate(this.template);
		Menu.setApplicationMenu(menu);
	}
};<commit_msg>Add "Arrange Windows" menu item<commit_after>'use strict';

const {
	app,
	BrowserWindow, 
	Menu
} = require('electron');

const util = require('./util');

const MENU_SEPARATOR = { type: 'separator' };

module.exports = {
	init() {
		this.createMenu();
	},
	
	createMenu() {
		this.template = [
			{
				label: 'Electron Icon',
				submenu: [
					{ label: 'Quit Electron Icon', accelerator: 'CommandOrControl+Q', click: () => app.quit() }
				]
			},
			{
				label: 'File',
				submenu: [
					{ label: 'Close Window', accelerator: 'CommandOrControl+W', role: 'close' },
					MENU_SEPARATOR,
					{ label: 'Export Open Windows As PNGs', accelerator: 'CommandOrControl+P', click: () => util.captureIcons() },
					{ label: 'Create Icons From PNGs', accelerator: 'CommandOrControl+I', click: () => util.createIcons() },
					{ label: 'Export PNGs and Create Icons', accelerator: 'Shift+CommandOrControl+I', click: () => util.captureAndCreateIcons() }
				]
			},
			{
				label: 'View',
				submenu: [
					{ label: 'Reload', accelerator: 'CommandOrControl+R', click: () => BrowserWindow.getFocusedWindow().reload() },
					{ label: 'Reload All', accelerator: 'Shift+CommandOrControl+R', click: () => util.reloadWindows() }
				]
			},
			{
				label: 'Window',
				submenu: [
					{ label: 'Arrange Windows', accelerator: 'CommandOrControl+A', click: () => util.arrangeWindows() },
					MENU_SEPARATOR,
					{ label: 'Minimize', accelerator: 'CommandOrControl+M', role: 'minimize' }
				]
			},
			{
				label: 'Debug',
				submenu: [
					{ label: 'Log Window Bounds', accelerator: 'CommandOrControl+L', click: () => util.logWindowBounds() },
					{ label: 'Toggle DevTools', accelerator: 'Alt+CommandOrControl+I', click: () => BrowserWindow.getFocusedWindow().toggleDevTools() }
				]
			}
		];
		
		const menu = Menu.buildFromTemplate(this.template);
		Menu.setApplicationMenu(menu);
	}
};
{'fraction_non_alphanumeric': 0.17550123592419664, 'fraction_numerical': 0.0, 'mean_word_length': 3.610126582278481, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '45295', 'n_tokens_mistral': 1473, 'n_tokens_neox': 1176, 'n_words': 248}