diff --git a/README.md b/README.md index c6670d1..21d3fdf 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,12 @@ When this value is set to `true`, application will be launched as a normal windo If menu bar behavior does not work for you, please use set this value to `true` to avoid it. Default value is `false` on macOS or Linux, `true` on Windows because window position is broken in some version of Windows. +### `menubar` + +When this value is set to `true`, the application will be launched with the +menubar visible, assuming `normal_window` is also true. When set to `false`, the +menubar will be hidden on launch. Default value is `true`. + ### `zoom_factor` Font zoom factor in application. It should be positive number. For example, `0.7` means `70%` font zooming. diff --git a/main/config.ts b/main/config.ts index 1ffcdd3..d72116c 100644 --- a/main/config.ts +++ b/main/config.ts @@ -13,6 +13,7 @@ export interface Config { hot_key: string; icon_color: string; always_on_top: boolean; + menubar: boolean; normal_window: boolean; zoom_factor: number; accounts: Account[]; @@ -27,6 +28,7 @@ function makeDefaultConfig(): Config { hot_key: 'CmdOrCtrl+Shift+S', icon_color: IsDarkMode ? 'white' : 'black', always_on_top: false, + menubar: true, normal_window: menubarBroken, zoom_factor: 0.9, accounts: [{ diff --git a/main/window.ts b/main/window.ts index 6e7d924..3e31f76 100644 --- a/main/window.ts +++ b/main/window.ts @@ -105,7 +105,7 @@ function startNormalWindow(account: Account, config: Config): Promise { icon: APP_ICON, show: false, useContentSize: true, - autoHideMenuBar: false, + autoHideMenuBar: !config.menubar, webPreferences: { nodeIntegration: false, sandbox: true,