Skip to content

Commit 9b3577d

Browse files
committed
Add more tweaks to macos-setup
1 parent dff9f8f commit 9b3577d

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

bin/macos-setup

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4+
basedir="$(cd "$(dirname "$0")/.." && pwd)"
5+
is_tart_vm=false
6+
if [ "$(sysctl -n hw.model 2>/dev/null)" = "VirtualMac2,1" ]; then
7+
is_tart_vm=true
8+
fi
9+
410
echo "Configuring macOS defaults..."
511

612
# Disable natural scrolling (old-style scroll direction)
@@ -25,8 +31,12 @@ defaults write NSGlobalDomain AppleShowAllExtensions -bool true
2531
# Full keyboard access (tab through all UI controls)
2632
defaults write NSGlobalDomain AppleKeyboardUIMode -int 2
2733

28-
# Dock: auto-hide
29-
defaults write com.apple.dock autohide -bool true
34+
# Dock: auto-hide (except in Tart VMs where screen space isn't limited)
35+
if $is_tart_vm; then
36+
defaults write com.apple.dock autohide -bool false
37+
else
38+
defaults write com.apple.dock autohide -bool true
39+
fi
3040

3141
# Don't rearrange Spaces based on most recent use
3242
defaults write com.apple.dock mru-spaces -bool false
@@ -38,4 +48,12 @@ defaults write com.apple.HIToolbox AppleDictationAutoEnable -int 0
3848
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
3949
defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false
4050

51+
# Disable Tips notifications
52+
defaults write com.apple.tips notificationsAllowed -bool false
53+
54+
# In Tart VMs, set desktop to solid grey
55+
if $is_tart_vm; then
56+
osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"$basedir/grey.png\""
57+
fi
58+
4159
echo "Done. Some changes require a logout or restart to take effect."

grey.png

96 Bytes
Loading

0 commit comments

Comments
 (0)