diff --git a/obsidian_asar_stock/main.js b/obsidian_asar_my/main.js
index f3e7ddf..dec732e 100644
--- a/obsidian_asar_stock/main.js
+++ b/obsidian_asar_my/main.js
@@ -7,6 +7,7 @@ let isWin = process.platform === 'win32';
 let electronVer = process.versions.electron;
 let electronMajorVer = parseInt(electronVer.split('.')[0]);
 
+
 // Source: https://github.com/parshap/node-sanitize-filename/blob/master/index.js
 let illegalRe = /[\/?<>\\:*|"]/g;
 let controlRe = /[\x00-\x1f\x80-\x9f]/g;
@@ -45,6 +46,8 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 		shell,
 		protocol,
 		Menu,
+		Tray,
+		// globalShortcut
 		screen,
 		dialog,
 		ipcMain,
@@ -55,7 +58,7 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 	} = require('electron');
 
 	let gotTheLock = app.requestSingleInstanceLock();
-	app.commandLine.appendSwitch('js-flags', '--expose-gc --always_compact');
+	app.commandLine.appendSwitch('js-flags', '--expose-gc');
 
 	if (!gotTheLock) {
 		app.quit();
@@ -304,8 +307,7 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 			minHeight: 150,
 			backgroundColor: '#00000000',
 			show: false,
-			frame: false,
-			titleBarStyle: 'hidden',
+			icon: path.join(__dirname, 'icon.png'),
 			webPreferences: {
 				contextIsolation: false,
 				worldSafeExecuteJavaScript: true,
@@ -557,6 +559,11 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 			// Has to be done here before the window is dead
 			updateState();
 			settingsSave(id, winSettings);
+			if(!quitting && BrowserWindow.getAllWindows().length <= 1){
+				e.preventDefault();
+				win.hide();
+				return false
+			}
 			setTimeout(() => {
 				if (!e.defaultPrevented && !win.isDestroyed()) {
 					win.destroy();
@@ -590,6 +597,25 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 		win.loadURL(URL_ROOT + 'index.html').then(show, show);
 		setVaultStatus(id, true);
 
+		win.webContents.on('before-input-event', (event, input) => {
+			// Esc = Minimize (to tray?) if no modal / menu
+			if (input.type == "keyDown" && input.key == "Escape") {
+				win.webContents.executeJavaScript(`
+				document.querySelector('div.menu') != null || document.querySelector('div.modal-container') != null
+				`, true).then((isdlg) => {
+					if (!isdlg) win.hide();
+				});
+			}
+			// Ctrl-Q = Quit
+			if (input.type == "keyUp" && input.control && input.key == "q") {
+				app.quit();
+			}
+			// Ctrl-Shit-I = devtools
+			if (input.type == "keyUp" && input.control && input.shift && input.key == "I") {
+				win.webContents.openDevTools();
+			}
+		})
+
 		return win;
 	}
 
@@ -650,6 +676,37 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 		}
 	}
 
+
+	function showi() {
+		for (let id in vaults) {
+			if (vaults[id].open) {
+				windows[id].show();
+				windows[id].focus();
+			}
+		}
+	}
+	function hidei() {
+		for (let id in vaults) {
+			if (vaults[id].open) {
+				windows[id].hide();
+			}
+		}
+	}
+	function togglei() {
+		let anyvisible = false;
+
+		for (let id in vaults) {
+			if (vaults[id].open && windows[id].isVisible()) {
+				anyvisible = true;
+			}
+		}
+		if (anyvisible) {
+			hidei();
+		} else {
+			showi();
+		}
+	}
+
 	app.whenReady().then(() => {
 		app.on('second-instance', (event, argv, workingDirectory) => {
 			if (onCommandLine(argv)) {
@@ -1068,149 +1125,7 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 				}
 			}
 		}
-
-		const template = [
-			{
-				label: '&Edit',
-				submenu: [
-					{role: 'undo'},
-					{role: 'redo'},
-					{type: 'separator'},
-					{role: 'cut'},
-					{role: 'copy'},
-					{role: 'paste'},
-					{role: 'pasteAndMatchStyle'},
-					// Define alternate paste as plaintext since the default for MacOS is too shitty (4 keystrokes)
-					{
-						label: 'Paste and Match Style',
-						accelerator: isMac ? 'Cmd+Shift+V' : 'Shift+CommandOrControl+Alt+V',
-						click: (menuItem, win) => win.webContents.pasteAndMatchStyle(),
-						visible: false,
-					},
-					{role: 'delete'},
-					{role: 'selectAll'}
-				]
-			},
-			{
-				label: '&View',
-				submenu: [
-					...(isDev ? [{role: 'reload'}] : []),
-					{role: 'forcereload', accelerator: ''},
-					{role: 'minimize', accelerator: ''},
-					{type: 'separator'},
-					{
-						label: 'Actual Size',
-						accelerator: 'CommandOrControl+0',
-						click(item, focusedWindow) {
-							if (focusedWindow) {
-								focusedWindow.webContents.zoomLevel = 0;
-							}
-						}
-					},
-					{
-						label: 'Zoom In',
-						accelerator: 'CommandOrControl+=',
-						click(item, focusedWindow) {
-							if (focusedWindow) {
-								focusedWindow.webContents.zoomLevel += 0.5;
-							}
-						}
-					},
-					{
-						label: 'Zoom Out',
-						accelerator: 'CommandOrControl+-',
-						click(item, focusedWindow) {
-							if (focusedWindow) {
-								focusedWindow.webContents.zoomLevel -= 0.5;
-							}
-						}
-					},
-					{type: 'separator'},
-					{
-						label: 'Navigate back',
-						accelerator: '',
-						click(item, focusedWindow) {
-							if (focusedWindow) {
-								focusedWindow.webContents.goBack();
-							}
-						}
-					},
-					{
-						label: 'Navigate forward',
-						accelerator: '',
-						click(item, focusedWindow) {
-							if (focusedWindow) {
-								focusedWindow.webContents.goForward();
-							}
-						}
-					},
-					{type: 'separator'},
-					{role: 'togglefullscreen'},
-					{role: 'toggleDevTools'},
-				]
-			},
-			{
-				label: '&Help',
-				role: 'help',
-				submenu: [
-					{
-						label: 'Open Help',
-						click: () => openHelp(),
-					},
-					{
-						label: 'Homepage',
-						click: () => shell.openExternal('https://obsidian.md'),
-					},
-					{
-						label: 'Community',
-						click: () => shell.openExternal('https://obsidian.md/community'),
-					},
-					{
-						label: 'Help Center',
-						click: () => shell.openExternal('https://publish.obsidian.md/help'),
-					},
-				]
-			}
-		];
-
-		if (isMac) {
-			template.unshift({
-				label: '&Obsidian',
-				submenu: [
-					{
-						role: 'hide',
-						label: 'Hide Obsidian'
-					},
-					{role: 'hideOthers'},
-					{role: 'unhide'},
-					{type: 'separator'},
-					{
-						role: 'quit',
-						label: 'Quit Obsidian'
-					}
-				]
-			});
-			template[1].submenu.push(
-				{type: 'separator'},
-				{
-					label: 'Speech',
-					submenu: [
-						{role: 'startspeaking'},
-						{role: 'stopspeaking'}
-					]
-				}
-			);
-		}
-		else {
-			template.unshift({
-				label: '&File',
-				submenu: [
-					{role: 'quit'}
-				]
-			})
-		}
-
-		Menu.setApplicationMenu(Menu.buildFromTemplate(template));
+		Menu.setApplicationMenu();
 
 		app.on('window-all-closed', () => {
 			if (!isMac) {
@@ -1240,6 +1155,38 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 		if (Object.keys(windows).length === 0) {
 			onActivate();
 		}
+
+		tray = new Tray(path.join(__dirname, 'icon.png'));
+
+		let userTools = [];
+		for (let id in vaults) {
+			if (!vaults[id].open) continue;
+			try {
+				let more = JSON.parse(fs.readFileSync(path.join(vaults[id].path, ".obsidian", "usertools.json"), 'utf8')) || [];
+				more.forEach((el) => userTools.push(el));
+			} catch (e) {}
+		}
+
+		let contextMenu = [
+			{ label: 'Show', click: showi },
+			{ label: 'Hide', click: hidei },
+			{ type: 'separator' },
+		];
+		if (userTools.length > 0) {
+			contextMenu.push({type: 'separator'});
+			let {exec} = require('child_process');
+			userTools.forEach((tool) => {
+				contextMenu.push({label: tool.label, click: () => exec(tool.exec)});
+			});
+		}
+		contextMenu.push({ type: 'separator'});
+		contextMenu.push({ label: 'Quit', click: () => { quitting=true; app.quit() } });
+
+		tray.setContextMenu(Menu.buildFromTemplate(contextMenu));
+		tray.on("click", togglei);
+
+		//globalShortcut.register('Meta+N', showi);
+
 	});
 
 	// Only do this on prod
@@ -1375,6 +1322,10 @@ module.exports = function (RES_PATH, updateEvents, isDev) {
 				return true;
 			}
 		}
+		try {
+			showi();
+			return true;
+		} catch (e) {}
 
 		return false;
 	}
