Skip to content

Commit d47b9f2

Browse files
authored
add config setting to disable overlay blocknums from showing when holding ctrl:shift (#2288)
1 parent 0b2fe52 commit d47b9f2

File tree

6 files changed

+9
-1
lines changed

6 files changed

+9
-1
lines changed

docs/docs/config.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ wsh editconfig
3636
| 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) |
3737
| 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). |
3838
| app:defaultnewblock | string | Sets the default new block (Cmd:n, Cmd:d). "term" for terminal block, "launcher" for launcher block (default = "term") |
39+
| app:showoverlayblocknums | bool | Set to false to disable the Ctrl+Shift block number overlay that appears when holding Ctrl+Shift (defaults to true) |
3940
| ai:preset | string | the default AI preset to use |
4041
| ai:baseurl | string | Set the AI Base Url (must be OpenAI compatible) |
4142
| ai:apitoken | string | your AI api token |

frontend/app/block/blockframe.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@ const BlockMask = React.memo(({ nodeModel }: { nodeModel: NodeModel }) => {
481481
const isFocused = jotai.useAtomValue(nodeModel.isFocused);
482482
const blockNum = jotai.useAtomValue(nodeModel.blockNum);
483483
const isLayoutMode = jotai.useAtomValue(atoms.controlShiftDelayAtom);
484+
const showOverlayBlockNums = jotai.useAtomValue(getSettingsKeyAtom("app:showoverlayblocknums")) ?? true;
484485
const [blockData] = WOS.useWaveObjectValue<Block>(WOS.makeORef("block", nodeModel.blockId));
485486
const style: React.CSSProperties = {};
486487
let showBlockMask = false;
@@ -504,7 +505,7 @@ const BlockMask = React.memo(({ nodeModel }: { nodeModel: NodeModel }) => {
504505
}
505506
}
506507
let innerElem = null;
507-
if (isLayoutMode) {
508+
if (isLayoutMode && showOverlayBlockNums) {
508509
showBlockMask = true;
509510
innerElem = (
510511
<div className="block-mask-inner">

frontend/types/gotypes.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ declare global {
683683
"app:globalhotkey"?: string;
684684
"app:dismissarchitecturewarning"?: boolean;
685685
"app:defaultnewblock"?: string;
686+
"app:showoverlayblocknums"?: boolean;
686687
"ai:*"?: boolean;
687688
"ai:preset"?: string;
688689
"ai:apitype"?: string;

pkg/wconfig/metaconsts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const (
1010
ConfigKey_AppGlobalHotkey = "app:globalhotkey"
1111
ConfigKey_AppDismissArchitectureWarning = "app:dismissarchitecturewarning"
1212
ConfigKey_AppDefaultNewBlock = "app:defaultnewblock"
13+
ConfigKey_AppShowOverlayBlockNums = "app:showoverlayblocknums"
1314

1415
ConfigKey_AiClear = "ai:*"
1516
ConfigKey_AiPreset = "ai:preset"

pkg/wconfig/settingsconfig.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type SettingsType struct {
5656
AppGlobalHotkey string `json:"app:globalhotkey,omitempty"`
5757
AppDismissArchitectureWarning bool `json:"app:dismissarchitecturewarning,omitempty"`
5858
AppDefaultNewBlock string `json:"app:defaultnewblock,omitempty"`
59+
AppShowOverlayBlockNums *bool `json:"app:showoverlayblocknums,omitempty"`
5960

6061
AiClear bool `json:"ai:*,omitempty"`
6162
AiPreset string `json:"ai:preset,omitempty"`

schema/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"app:defaultnewblock": {
1818
"type": "string"
1919
},
20+
"app:showoverlayblocknums": {
21+
"type": "boolean"
22+
},
2023
"ai:*": {
2124
"type": "boolean"
2225
},

0 commit comments

Comments
 (0)