diff --git a/app/scripts/comp/launcher/launcher-electron.js b/app/scripts/comp/launcher/launcher-electron.js index 1d0345ec..d6f2ecba 100644 --- a/app/scripts/comp/launcher/launcher-electron.js +++ b/app/scripts/comp/launcher/launcher-electron.js @@ -305,6 +305,8 @@ Events.on('launcher-exit-request', () => { setTimeout(() => Launcher.exit(), 0); }); Events.on('launcher-minimize', () => setTimeout(() => Events.emit('app-minimized'), 0)); +Events.on('launcher-started-minimized', () => setTimeout(() => Launcher.minimizeApp(), 0)); + window.launcherOpen = file => Launcher.openFile(file); if (window.launcherOpenedFile) { logger.info('Open file request', window.launcherOpenedFile); diff --git a/desktop/app.js b/desktop/app.js index 4002b186..7f43dbd0 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -31,8 +31,11 @@ let htmlPath = process.argv if (!htmlPath) { htmlPath = 'file://' + path.join(__dirname, 'index.html'); } + const showDevToolsOnStart = process.argv.some(arg => arg.startsWith('--devtools')); +const startMinimized = process.argv.some(arg => arg.startsWith('--minimized')); + const themeBgColors = { db: '#342f2e', fb: '#282c34', @@ -180,7 +183,11 @@ function createMainWindow() { mainWindow.openDevTools({ mode: 'bottom' }); } mainWindow.once('ready-to-show', () => { - mainWindow.show(); + if (startMinimized) { + emitRemoteEvent('launcher-started-minimized'); + } else { + mainWindow.show(); + } ready = true; notifyOpenFile(); }); diff --git a/release-notes.md b/release-notes.md index f03b4e0b..6e5fd4fd 100644 --- a/release-notes.md +++ b/release-notes.md @@ -6,6 +6,7 @@ Release notes `+` #963: keyboard shortcut to copy OTP in background `+` #565: global shortcut to open KeeWeb `+` #862: downloading attachments on mobile +`+` #480: option to launch the app minimized `-` fix #1273: untranslated menu items ##### v1.11.6 (2019-10-04)