mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: implement launch minimized option
This commit is contained in:
parent
7af56cd7cc
commit
9e020652c9
4 changed files with 10 additions and 5 deletions
|
|
@ -16,15 +16,16 @@ const windowsStartupPath = path.join(
|
|||
|
||||
const autoLaunch = async (
|
||||
_event: Electron.IpcMainInvokeEvent,
|
||||
enabled: boolean
|
||||
autoLaunchProps: { enabled: boolean; minimized: boolean }
|
||||
) => {
|
||||
if (!app.isPackaged) return;
|
||||
|
||||
const appLauncher = new AutoLaunch({
|
||||
name: app.getName(),
|
||||
isHidden: autoLaunchProps.minimized,
|
||||
});
|
||||
|
||||
if (enabled) {
|
||||
if (autoLaunchProps.enabled) {
|
||||
appLauncher.enable().catch((err) => {
|
||||
logger.error(err);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue