Skip to content
Merged
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
2 changes: 1 addition & 1 deletion docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions examples/macform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions internal/registry/appearance.go
Original file line number Diff line number Diff line change
@@ -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",
},
},
}
3 changes: 2 additions & 1 deletion internal/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand Down