From 68e091708eef275df6ccda8d80f5239d8e06a742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20D=C3=BCren?= Date: Fri, 9 Jan 2026 19:26:36 -0600 Subject: [PATCH] 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 --- bin/configure_macos | 5 +++++ install.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/bin/configure_macos b/bin/configure_macos index 364f87e..8156453 100755 --- a/bin/configure_macos +++ b/bin/configure_macos @@ -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 diff --git a/install.sh b/install.sh index 7e42440..2262db4 100755 --- a/install.sh +++ b/install.sh @@ -297,6 +297,11 @@ defaults write NSGlobalDomain AppleShowAllExtensions -bool true print_info "Setting trash to empty after 30 days" defaults write com.apple.finder FXRemoveOldTrashItems -bool true +# Safari: Open with all windows from last session +print_info "Configuring Safari to restore all windows from last session" +defaults write com.apple.Safari AlwaysRestoreSessionAtLaunch -bool true 2>/dev/null || \ + print_warning "Safari preference may need to be set manually in Safari > Settings > General" + # Restart affected applications print_info "Restarting Finder and Dock to apply changes" killall Finder 2>/dev/null || true