Skip to content

Commit bb12ed6

Browse files
feat: Add fullscreen launch setting (#1933) (#2490)
New UI Setting: Launch On Fullscreen A new option has been added to the view menu allowing users to enable fullscreen mode automatically when Wave launches. This setting is persistent and can be toggled on a per-user basis.
1 parent be1dc27 commit bb12ed6

8 files changed

Lines changed: 42 additions & 1 deletion

File tree

emain/emain-menu.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ async function getAppMenu(
192192

193193
const devToolsAccel = unamePlatform === "darwin" ? "Option+Command+I" : "Alt+Shift+I";
194194
const isBuilderWindowFocused = focusedBuilderWindow != null;
195+
let fullscreenOnLaunch = false;
196+
try {
197+
const fullConfig = await RpcApi.GetFullConfigCommand(ElectronWshClient);
198+
fullscreenOnLaunch = fullConfig?.settings["window:fullscreenonlaunch"];
199+
} catch (e) {
200+
console.error("Error fetching fullscreen launch config:", e);
201+
}
195202
const viewMenu: Electron.MenuItemConstructorOptions[] = [
196203
{
197204
label: isBuilderWindowFocused ? "Reload Window" : "Reload Tab",
@@ -290,6 +297,27 @@ async function getAppMenu(
290297
visible: false,
291298
acceleratorWorksWhenHidden: true,
292299
},
300+
{
301+
label: "Launch On Full Screen",
302+
submenu: [
303+
{
304+
label: "On",
305+
type: "radio",
306+
checked: fullscreenOnLaunch,
307+
click: () => {
308+
RpcApi.SetConfigCommand(ElectronWshClient, { "window:fullscreenonlaunch": true });
309+
},
310+
},
311+
{
312+
label: "Off",
313+
type: "radio",
314+
checked: !fullscreenOnLaunch,
315+
click: () => {
316+
RpcApi.SetConfigCommand(ElectronWshClient, { "window:fullscreenonlaunch": false });
317+
},
318+
},
319+
],
320+
},
293321
{
294322
type: "separator",
295323
},

emain/emain-window.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,12 @@ export class WaveBrowserWindow extends BaseWindow {
192192
}
193193

194194
super(winOpts);
195+
const fullscreenOnLaunch = fullConfig?.settings["window:fullscreenonlaunch"];
196+
if (fullscreenOnLaunch) {
197+
this.once("show", () => {
198+
this.setFullScreen(true);
199+
});
200+
}
195201
this.actionQueue = [];
196202
this.waveWindowId = waveWindow.oid;
197203
this.workspaceId = waveWindow.workspaceid;

frontend/app/view/term/term-model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2025, Command Line Inc.
22
// SPDX-License-Identifier: Apache-2.0
33

4-
import { Block } from "@/app/block/block";
4+
55
import { BlockNodeModel } from "@/app/block/blocktypes";
66
import { waveEventSubscribe } from "@/app/store/wps";
77
import { RpcApi } from "@/app/store/wshclientapi";

frontend/types/gotypes.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ declare global {
951951
"widget:*"?: boolean;
952952
"widget:showhelp"?: boolean;
953953
"window:*"?: boolean;
954+
"window:fullscreenonlaunch"?: boolean;
954955
"window:transparent"?: boolean;
955956
"window:blur"?: boolean;
956957
"window:opacity"?: number;

pkg/wconfig/defaultconfig/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"window:magnifiedblockopacity": 0.6,
1919
"window:magnifiedblocksize": 0.9,
2020
"window:magnifiedblockblurprimarypx": 10,
21+
"window:fullscreenonlaunch": false,
2122
"window:magnifiedblockblursecondarypx": 2,
2223
"window:confirmclose": true,
2324
"window:savelastwindow": true,

pkg/wconfig/metaconsts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const (
7171
ConfigKey_WidgetShowHelp = "widget:showhelp"
7272

7373
ConfigKey_WindowClear = "window:*"
74+
ConfigKey_WindowFullscreenOnLaunch = "window:fullscreenonlaunch"
7475
ConfigKey_WindowTransparent = "window:transparent"
7576
ConfigKey_WindowBlur = "window:blur"
7677
ConfigKey_WindowOpacity = "window:opacity"

pkg/wconfig/settingsconfig.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ type SettingsType struct {
117117
WidgetShowHelp *bool `json:"widget:showhelp,omitempty"`
118118

119119
WindowClear bool `json:"window:*,omitempty"`
120+
WindowFullscreenOnLaunch bool `json:"window:fullscreenonlaunch,omitempty"`
120121
WindowTransparent bool `json:"window:transparent,omitempty"`
121122
WindowBlur bool `json:"window:blur,omitempty"`
122123
WindowOpacity *float64 `json:"window:opacity,omitempty"`

schema/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@
170170
"window:*": {
171171
"type": "boolean"
172172
},
173+
"window:fullscreenonlaunch": {
174+
"type": "boolean"
175+
},
173176
"window:transparent": {
174177
"type": "boolean"
175178
},

0 commit comments

Comments
 (0)