geerlingguy / mac-dev-playbook

Mac setup and configuration via Ansible.
Other
6k stars 1.77k forks source link

Quirks with automating macOS Sonoma #210

Open geerlingguy opened 1 week ago

geerlingguy commented 1 week ago

I decided to finally upgrade to Sonoma, since I'm also adding on an M4 Mac mini... therefore I will document any weird problems I find in this project and try to resolve them in this issue.

geerlingguy commented 1 week ago

Surprisingly, very few things failed. Dock resizing seems not to work, and a couple apps were missing as I did the thing in the wrong order the first time.

geerlingguy commented 1 week ago

In my .osx file, I have:

# Disable press-and-hold for keys in favor of key repeat
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false

# Set a blazingly fast keyboard repeat rate, and make it happen more quickly.
# (The KeyRepeat option requires logging out and back in to take effect.)
defaults write NSGlobalDomain InitialKeyRepeat -int 20
defaults write NSGlobalDomain KeyRepeat -int 1

I do this because I often like to 'scroll' with just the down arrow or keys in Vim quickly, without going a page at a time. The fastest I can go using macOS's built-in slider is not very fast (for me).

Those settings don't seem to do anything in Sonoma, see Did we lose key repeat in Sonoma?.

geerlingguy commented 1 week ago

Also, for some uses, Terminal really needs to have full disk access:

Inside "Privacy & Security" > "Full Disk Access", enable 'Terminal'

I don't know if I'm going to recommend that as a default though.

geerlingguy commented 1 week ago

It looks like the key repeat stuff might be under com.apple.Accessibililty now:

********* READING DEFAULT DOMAIN com.apple.Accessibility **********

{
    AXSClassicInvertColorsPreference = 0;
    ApplicationAccessibilityEnabled = 0;
    AutomationEnabled = 0;
    BrailleInputDeviceConnected = 0;
    CommandAndControlEnabled = 0;
    DarkenSystemColors = 0;
    DifferentiateWithoutColor = 0;
    EnhancedBackgroundContrastEnabled = 1;
    FullKeyboardAccessEnabled = 0;
    FullKeyboardAccessFocusRingEnabled = 1;
    GenericAccessibilityClientEnabled = 0;
    GrayscaleDisplay = 0;
    InvertColorsEnabled = 0;
    KeyRepeatDelay = "0.5";
    KeyRepeatEnabled = 1;
    KeyRepeatInterval = "0.083333333";
    ReduceMotionEnabled = 0;
    SpeakThisEnabled = 0;
    VoiceOverTouchEnabled = 0;
}

Debugged with:

for i in `defaults domains | tr ',' '\n'`; do echo "********* READING DEFAULT DOMAIN $i **********"; echo; defaults read $i; done

I'm going to test the following and log out and log back in to see if it takes:

defaults write com.apple.Accessibility KeyRepeatDelay -float 0.1
defaults write com.apple.Accessibility KeyRepeatInterval -float 0.001
geerlingguy commented 1 week ago

Nope... looks like those values were set back to 0.5 and 0.083333333, respectively :(

geerlingguy commented 1 week ago

Also started getting very annoyed that if I clicked on the desktop, all my windows would fly away. Apparently there's some silly default for that in Sonoma. Luckily disabling it is as simple as:

defaults write com.apple.WindowManager EnableStandardClickToShowDesktop -bool false
geerlingguy commented 1 week ago

For Dock resizing, this works:

defaults write com.apple.dock tilesize -int 30; killall Dock

The int is the dimension of icons in the Dock.

Edit: That's... apparently in the .osx file already, so maybe it was just errored out on first run.

geerlingguy commented 1 day ago

The worst thing running Sequoia a few days: autocorrect is still autocorrecting / switching suggestions even though I thought I disabled it in System Preferences!

Screenshot 2024-11-20 at 10 35 52 PM

Example of frustration:

typing words

geerlingguy commented 1 day ago

Apparently as suggested on X, "turning it on and off again" worked, lol.