mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-22 02:13:59 +00:00
feat: implement launch minimized option
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user