diff --git a/docs/spec.md b/docs/spec.md index e2679f4..d7b66ca 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -317,7 +317,7 @@ dock: - **Single binary**: No runtime dependencies. Distributed as a compiled Go binary. - **Fast**: `plan` should complete in under 2 seconds for a full spec. - **Safe**: `plan` is always read-only. `apply` prompts before writing unless `--auto-approve`. -- **macOS compatibility**: Target macOS 15 (Tahoe) to start. Compatibility with multiple versions is a future goal. +- **macOS compatibility**: Target macOS 26 (Tahoe) to start. Compatibility with multiple versions is a future goal. - **Extensible**: Adding a new provider requires only: (a) implement the `Provider` interface, (b) add entries to the registry with the new provider name. ## Success Criteria diff --git a/examples/macform.yaml b/examples/macform.yaml index d50dbef..5bd5dfa 100644 --- a/examples/macform.yaml +++ b/examples/macform.yaml @@ -4,6 +4,13 @@ # valid values, and macOS system default. Copy this file to your project root # (or home directory) as macform.yaml and customise to taste. +appearance: + # Description: When to show scroll bars + # Type: string + # Valid values: automatic | when-scrolling | always + # Default: automatic + show-scroll-bars: automatic + dock: # Description: Auto-hide the Dock when the pointer is not near it # Type: bool diff --git a/internal/registry/appearance.go b/internal/registry/appearance.go new file mode 100644 index 0000000..92243b1 --- /dev/null +++ b/internal/registry/appearance.go @@ -0,0 +1,14 @@ +package registry + +import "github.com/vsimon/macform/internal/provider" + +var appearanceSettings = []SettingDef{ + { + SpecKey: "show-scroll-bars", + Type: "string", + Provider: provider.NewDefaults("NSGlobalDomain", "AppleShowScrollBars", "string"), + ValueMap: map[string]string{ + "automatic": "Automatic", "when-scrolling": "WhenScrolling", "always": "Always", + }, + }, +} diff --git a/internal/registry/registry.go b/internal/registry/registry.go index 3c0289c..959e427 100644 --- a/internal/registry/registry.go +++ b/internal/registry/registry.go @@ -116,6 +116,7 @@ var sections = map[string][]SettingDef{ Provider: provider.NewOsascript("slightly-dim-on-battery", slightlyDimReadScript, slightlyDimWriteScript, "true"), }, }, + "appearance": appearanceSettings, "control-center": controlCenterSettings, "trackpad": trackpadSettings, "keyboard": keyboardSettings, @@ -205,7 +206,7 @@ func SectionKeys(section string) []SettingDef { // Sections returns the ordered list of section names. func Sections() []string { - return []string{"dock", "finder", "display", "battery", "control-center", "trackpad", "keyboard", "hot-corners"} + return []string{"appearance", "dock", "finder", "display", "battery", "control-center", "trackpad", "keyboard", "hot-corners"} } // Encode converts a spec value to its system (defaults) representation.