-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathcategories.go
More file actions
158 lines (154 loc) · 7.88 KB
/
Copy pathcategories.go
File metadata and controls
158 lines (154 loc) · 7.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
package macos
// PrefCategory groups related macOS preferences for display in the TUI selector.
type PrefCategory struct {
Name string
Icon string
Prefs []Preference
}
// PrefKey returns a unique identifier for a preference, used as the selection map key.
func PrefKey(p Preference) string {
return p.Domain + "/" + p.Key
}
// DefaultCategories groups DefaultPreferences by logical category.
var DefaultCategories = []PrefCategory{
{
Name: "System",
Icon: "⚙",
Prefs: []Preference{
{"NSGlobalDomain", "AppleShowAllExtensions", "bool", "true", "Show all file extensions"},
{"NSGlobalDomain", "AppleShowScrollBars", "string", "Always", "Always show scrollbars"},
{"NSGlobalDomain", "NSAutomaticSpellingCorrectionEnabled", "bool", "false", "Disable auto-correct"},
{"NSGlobalDomain", "NSAutomaticCapitalizationEnabled", "bool", "false", "Disable auto-capitalization"},
{"NSGlobalDomain", "KeyRepeat", "int", "2", "Fast key repeat rate"},
{"NSGlobalDomain", "InitialKeyRepeat", "int", "15", "Short delay until key repeat"},
},
},
{
Name: "Finder",
Icon: "📁",
Prefs: []Preference{
// View
{"com.apple.finder", "ShowPathbar", "bool", "true", "Show path bar in Finder"},
{"com.apple.finder", "ShowStatusBar", "bool", "true", "Show status bar in Finder"},
{"com.apple.finder", "ShowSidebar", "bool", "true", "Show sidebar in Finder"},
{"com.apple.finder", "ShowTabView", "bool", "true", "Show tab bar in Finder"},
{"com.apple.finder", "ShowPreviewPane", "bool", "false", "Show preview pane in Finder"},
{"com.apple.finder", "FXPreferredViewStyle", "string", "Nlsv", "Use list view in Finder"},
{"com.apple.finder", "AppleShowAllFiles", "bool", "true", "Show hidden files in Finder"},
{"com.apple.finder", "_FXShowPosixPathInTitle", "bool", "true", "Show full POSIX path in Finder title"},
// Behavior
{"com.apple.finder", "FXEnableExtensionChangeWarning", "bool", "false", "No extension change warning"},
{"com.apple.finder", "FXDefaultSearchScope", "string", "SCcf", "Search current folder by default"},
{"com.apple.finder", "_FXSortFoldersFirst", "bool", "true", "Keep folders on top when sorting by name"},
{"com.apple.finder", "_FXSortFoldersFirstOnDesktop", "bool", "true", "Keep folders on top on Desktop"},
{"com.apple.finder", "WarnOnEmptyTrash", "bool", "false", "Don't warn before emptying Trash"},
{"com.apple.finder", "FXRemoveOldTrashItems", "bool", "true", "Remove Trash items after 30 days"},
{"com.apple.finder", "QuitMenuItem", "bool", "true", "Allow quitting Finder via ⌘Q"},
// New Window
{"com.apple.finder", "NewWindowTarget", "string", "PfHm", "New Finder window target (PfHm=Home, PfDe=Desktop, PfDo=Documents, PfLo=Other)"},
{"com.apple.finder", "NewWindowTargetPath", "string", "", "Custom path for new Finder windows (when target is PfLo)"},
// Desktop icons
{"com.apple.finder", "ShowExternalHardDrivesOnDesktop", "bool", "true", "Show external drives on Desktop"},
{"com.apple.finder", "ShowHardDrivesOnDesktop", "bool", "false", "Don't show hard drives on Desktop"},
{"com.apple.finder", "ShowMountedServersOnDesktop", "bool", "false", "Don't show servers on Desktop"},
{"com.apple.finder", "ShowRemovableMediaOnDesktop", "bool", "true", "Show removable media on Desktop"},
{"com.apple.finder", "ShowRecentTags", "bool", "true", "Show recent tags in sidebar"},
// .DS_Store
{"com.apple.desktopservices", "DSDontWriteNetworkStores", "bool", "true", "No .DS_Store on network volumes"},
{"com.apple.desktopservices", "DSDontWriteUSBStores", "bool", "true", "No .DS_Store on USB volumes"},
},
},
{
Name: "Dock",
Icon: "🚢",
Prefs: []Preference{
{"com.apple.dock", "autohide", "bool", "false", "Keep Dock visible"},
{"com.apple.dock", "show-recents", "bool", "false", "Don't show recent apps in Dock"},
{"com.apple.dock", "tilesize", "int", "48", "Set Dock icon size to 48"},
{"com.apple.dock", "mineffect", "string", "scale", "Minimize windows with scale effect"},
},
},
{
Name: "Screenshots",
Icon: "📸",
Prefs: []Preference{
{"com.apple.screencapture", "location", "string", "~/Screenshots", "Save screenshots to ~/Screenshots"},
{"com.apple.screencapture", "type", "string", "png", "Save screenshots as PNG"},
{"com.apple.screencapture", "disable-shadow", "bool", "true", "Disable screenshot shadows"},
},
},
{
Name: "Trackpad",
Icon: "🖱",
Prefs: []Preference{
{"com.apple.AppleMultitouchTrackpad", "Clicking", "bool", "true", "Tap to click"},
{"com.apple.driver.AppleBluetoothMultitouch.trackpad", "Clicking", "bool", "true", "Tap to click (Bluetooth)"},
{"com.apple.AppleMultitouchTrackpad", "TrackpadThreeFingerDrag", "bool", "true", "Three-finger drag"},
},
},
{
Name: "Keyboard",
Icon: "⌨",
Prefs: []Preference{
{"NSGlobalDomain", "com.apple.keyboard.fnState", "bool", "true", "Use F1, F2, etc. as standard function keys"},
},
},
{
Name: "Mission Control",
Icon: "🖥",
Prefs: []Preference{
{"com.apple.dock", "mru-spaces", "bool", "false", "Don't auto-rearrange Spaces based on recent use"},
{"com.apple.dock", "expose-group-apps", "bool", "true", "Group windows by application"},
{"com.apple.dock", "wvous-tl-corner", "int", "0", "Disable top-left hot corner"},
{"com.apple.dock", "wvous-tr-corner", "int", "0", "Disable top-right hot corner"},
{"com.apple.dock", "wvous-bl-corner", "int", "0", "Disable bottom-left hot corner"},
{"com.apple.dock", "wvous-br-corner", "int", "0", "Disable bottom-right hot corner"},
{"com.apple.dock", "wvous-tl-modifier", "int", "0", "No modifier key for top-left hot corner"},
{"com.apple.dock", "wvous-tr-modifier", "int", "0", "No modifier key for top-right hot corner"},
{"com.apple.dock", "wvous-bl-modifier", "int", "0", "No modifier key for bottom-left hot corner"},
{"com.apple.dock", "wvous-br-modifier", "int", "0", "No modifier key for bottom-right hot corner"},
},
},
{
Name: "Menu Bar",
Icon: "🎛",
Prefs: []Preference{
{"com.apple.controlcenter", "NSStatusItem Visible Sound", "bool", "true", "Show Sound in menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible Bluetooth", "bool", "true", "Show Bluetooth in menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible WiFi", "bool", "true", "Show Wi-Fi in menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible Battery", "bool", "true", "Show Battery in menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible AirDrop", "bool", "false", "Hide AirDrop from menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible Display", "bool", "false", "Hide Display from menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible FocusModes", "bool", "false", "Hide Focus Modes from menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible NowPlaying", "bool", "false", "Hide Now Playing from menu bar"},
{"com.apple.controlcenter", "NSStatusItem Visible ScreenMirroring", "bool", "false", "Hide Screen Mirroring from menu bar"},
},
},
{
Name: "Security",
Icon: "🔒",
Prefs: []Preference{
{"com.apple.screensaver", "askForPassword", "int", "1", "Require password after sleep or screen saver"},
{"com.apple.screensaver", "askForPasswordDelay", "int", "0", "No delay before password required"},
},
},
{
Name: "Desktop & Stage Manager",
Icon: "🪟",
Prefs: []Preference{
// false → wallpaper click hides windows only while Stage Manager is active (macOS Sonoma+ default).
// true → wallpaper click always reveals desktop (pre-Sonoma behaviour).
{"com.apple.WindowManager", "EnableStandardClickToShowDesktop", "bool", "false", "Click wallpaper to show desktop only in Stage Manager"},
},
},
}
// AllPrefsSelected returns a map with all default preferences set to true.
func AllPrefsSelected() map[string]bool {
selected := make(map[string]bool)
for _, cat := range DefaultCategories {
for _, p := range cat.Prefs {
selected[PrefKey(p)] = true
}
}
return selected
}