Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ wsh editconfig
| widget:showhelp | bool | whether to show help/tips widgets in right sidebar |
| window:transparent | bool | set to true to enable window transparency (cannot be combined with `window:blur`) (macOS and Windows only, requires app restart, see [note on Windows compatibility](https://www.electronjs.org/docs/latest/tutorial/custom-window-styles#limitations)) |
| window:blur | bool | set to enable window background blurring (cannot be combined with `window:transparent`) (macOS and Windows only, requires app restart, see [note on Windows compatibility](https://www.electronjs.org/docs/latest/tutorial/custom-window-styles#limitations)) |
| window:visualeffectstate | string | controls whether macOS vibrancy follows window focus (`followWindow`, default), always appears active (`active`), or always appears inactive (`inactive`); macOS only, ignored on other platforms, requires `window:blur` and an app restart |
| window:opacity | float64 | 0-1, window opacity when `window:transparent` or `window:blur` are set |
| window:bgcolor | string | set the window background color (should be hex: #xxxxxx) |
| window:reducedmotion | bool | set to true to disable most animations |
Expand Down
5 changes: 5 additions & 0 deletions emain/emain-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ export class WaveBrowserWindow extends BaseWindow {
winOpts.transparent = true;
} else if (isBlur) {
winOpts.vibrancy = "fullscreen-ui";
const visualEffectState = settings?.["window:visualeffectstate"];
winOpts.visualEffectState =
visualEffectState === "active" || visualEffectState === "inactive"
? visualEffectState
: "followWindow";
} else {
winOpts.backgroundColor = "#222222";
}
Expand Down
1 change: 1 addition & 0 deletions frontend/types/gotypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,7 @@ declare global {
"window:fullscreenonlaunch"?: boolean;
"window:transparent"?: boolean;
"window:blur"?: boolean;
"window:visualeffectstate"?: string;
"window:opacity"?: number;
"window:bgcolor"?: string;
"window:reducedmotion"?: boolean;
Expand Down
1 change: 1 addition & 0 deletions pkg/wconfig/metaconsts.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const (
ConfigKey_WindowFullscreenOnLaunch = "window:fullscreenonlaunch"
ConfigKey_WindowTransparent = "window:transparent"
ConfigKey_WindowBlur = "window:blur"
ConfigKey_WindowVisualEffectState = "window:visualeffectstate"
ConfigKey_WindowOpacity = "window:opacity"
ConfigKey_WindowBgColor = "window:bgcolor"
ConfigKey_WindowReducedMotion = "window:reducedmotion"
Expand Down
1 change: 1 addition & 0 deletions pkg/wconfig/settingsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ type SettingsType struct {
WindowFullscreenOnLaunch bool `json:"window:fullscreenonlaunch,omitempty"`
WindowTransparent bool `json:"window:transparent,omitempty"`
WindowBlur bool `json:"window:blur,omitempty"`
WindowVisualEffectState string `json:"window:visualeffectstate,omitempty" jsonschema:"enum=followWindow,enum=active,enum=inactive"`
WindowOpacity *float64 `json:"window:opacity,omitempty"`
WindowBgColor string `json:"window:bgcolor,omitempty"`
WindowReducedMotion bool `json:"window:reducedmotion,omitempty"`
Expand Down
8 changes: 8 additions & 0 deletions schema/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@
"window:blur": {
"type": "boolean"
},
"window:visualeffectstate": {
"type": "string",
"enum": [
"followWindow",
"active",
"inactive"
]
},
"window:opacity": {
"type": "number"
},
Expand Down