Add Safari preference to restore all windows from last session

- Configure Safari to open with all windows from last session
- Include fallback warning if Safari's containerized preferences are inaccessible

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Andreas Düren
2026-01-09 19:26:36 -06:00
parent a35b6baaa5
commit 68e091708e
2 changed files with 10 additions and 0 deletions

View File

@@ -30,6 +30,11 @@ defaults write NSGlobalDomain AppleShowAllExtensions -bool true
printf " • Setting trash to empty after 30 days...\n"
defaults write com.apple.finder FXRemoveOldTrashItems -bool true
# Safari: Open with all windows from last session
printf " • Configuring Safari to restore all windows from last session...\n"
defaults write com.apple.Safari AlwaysRestoreSessionAtLaunch -bool true 2>/dev/null || \
printf " ⚠ Safari preference may need to be set manually in Safari > Settings > General\n"
# Restart affected applications
printf "\n🔄 Restarting Finder and Dock to apply changes...\n"
killall Finder