diff --git a/docs/docs/config.mdx b/docs/docs/config.mdx index 21cb1a221b..1b27b5cc96 100644 --- a/docs/docs/config.mdx +++ b/docs/docs/config.mdx @@ -36,6 +36,7 @@ wsh editconfig | app:globalhotkey | string | A systemwide keybinding to open your most recent wave window. This is a set of key names separated by `:`. For more info, see [Customizable Systemwide Global Hotkey](#customizable-systemwide-global-hotkey) | | app:dismissarchitecturewarning | bool | Disable warnings on app start when you are using a non-native architecture for Wave. For more info, see [Why does Wave warn me about ARM64 translation when it launches?](./faq#why-does-wave-warn-me-about-arm64-translation-when-it-launches). | | app:defaultnewblock | string | Sets the default new block (Cmd:n, Cmd:d). "term" for terminal block, "launcher" for launcher block (default = "term") | +| app:showoverlayblocknums | bool | Set to false to disable the Ctrl+Shift block number overlay that appears when holding Ctrl+Shift (defaults to true) | | ai:preset | string | the default AI preset to use | | ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) | | ai:apitoken | string | your AI api token | diff --git a/frontend/app/block/blockframe.tsx b/frontend/app/block/blockframe.tsx index d4be5393d3..95cd532c97 100644 --- a/frontend/app/block/blockframe.tsx +++ b/frontend/app/block/blockframe.tsx @@ -481,6 +481,7 @@ const BlockMask = React.memo(({ nodeModel }: { nodeModel: NodeModel }) => { const isFocused = jotai.useAtomValue(nodeModel.isFocused); const blockNum = jotai.useAtomValue(nodeModel.blockNum); const isLayoutMode = jotai.useAtomValue(atoms.controlShiftDelayAtom); + const showOverlayBlockNums = jotai.useAtomValue(getSettingsKeyAtom("app:showoverlayblocknums")) ?? true; const [blockData] = WOS.useWaveObjectValue(WOS.makeORef("block", nodeModel.blockId)); const style: React.CSSProperties = {}; let showBlockMask = false; @@ -504,7 +505,7 @@ const BlockMask = React.memo(({ nodeModel }: { nodeModel: NodeModel }) => { } } let innerElem = null; - if (isLayoutMode) { + if (isLayoutMode && showOverlayBlockNums) { showBlockMask = true; innerElem = (
diff --git a/frontend/types/gotypes.d.ts b/frontend/types/gotypes.d.ts index 9b4e8c5be9..b2c89fe3f7 100644 --- a/frontend/types/gotypes.d.ts +++ b/frontend/types/gotypes.d.ts @@ -683,6 +683,7 @@ declare global { "app:globalhotkey"?: string; "app:dismissarchitecturewarning"?: boolean; "app:defaultnewblock"?: string; + "app:showoverlayblocknums"?: boolean; "ai:*"?: boolean; "ai:preset"?: string; "ai:apitype"?: string; diff --git a/pkg/wconfig/metaconsts.go b/pkg/wconfig/metaconsts.go index fa672d5791..ec64ddac57 100644 --- a/pkg/wconfig/metaconsts.go +++ b/pkg/wconfig/metaconsts.go @@ -10,6 +10,7 @@ const ( ConfigKey_AppGlobalHotkey = "app:globalhotkey" ConfigKey_AppDismissArchitectureWarning = "app:dismissarchitecturewarning" ConfigKey_AppDefaultNewBlock = "app:defaultnewblock" + ConfigKey_AppShowOverlayBlockNums = "app:showoverlayblocknums" ConfigKey_AiClear = "ai:*" ConfigKey_AiPreset = "ai:preset" diff --git a/pkg/wconfig/settingsconfig.go b/pkg/wconfig/settingsconfig.go index d5516cbff7..f2016e4db8 100644 --- a/pkg/wconfig/settingsconfig.go +++ b/pkg/wconfig/settingsconfig.go @@ -56,6 +56,7 @@ type SettingsType struct { AppGlobalHotkey string `json:"app:globalhotkey,omitempty"` AppDismissArchitectureWarning bool `json:"app:dismissarchitecturewarning,omitempty"` AppDefaultNewBlock string `json:"app:defaultnewblock,omitempty"` + AppShowOverlayBlockNums *bool `json:"app:showoverlayblocknums,omitempty"` AiClear bool `json:"ai:*,omitempty"` AiPreset string `json:"ai:preset,omitempty"` diff --git a/schema/settings.json b/schema/settings.json index c38d46c315..3c9ebbc1cb 100644 --- a/schema/settings.json +++ b/schema/settings.json @@ -17,6 +17,9 @@ "app:defaultnewblock": { "type": "string" }, + "app:showoverlayblocknums": { + "type": "boolean" + }, "ai:*": { "type": "boolean" },