Skip to content

Commit

Permalink
Support containerized Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiSG committed Jan 2, 2020
1 parent f547280 commit 65cec7c
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 36 deletions.
6 changes: 6 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ if [[ $machineAlreadySetUp != 'n' ]]
then
echo 'Nothing to do for the machine'
else
echo "Before anything, you need to give Terminal and bash full disk access through System Preferences"
echo "See how to do this on <https://github.com/mathiasbynens/dotfiles/issues/849#issuecomment-436099833>"
echo "If requested to restart Terminal, accept it and relaunch this script"
echo "Quit System Preferences once you've set this up to continue"
open -W /System/Library/PreferencePanes/Security.prefPane

echo "Opening AppStore for manual install"
open -a "App Store"

Expand Down
72 changes: 36 additions & 36 deletions session/osx-defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -375,88 +375,88 @@ defaults write com.apple.dock wvous-bl-modifier -int 0
###############################################################################

# Privacy: don’t send search queries to Apple
defaults write com.apple.Safari UniversalSearchEnabled -bool false
defaults write com.apple.Safari SuppressSearchSuggestions -bool true
defaults write -app Safari UniversalSearchEnabled -bool false
defaults write -app Safari SuppressSearchSuggestions -bool true

# Press Tab to highlight each item on a web page
#defaults write com.apple.Safari WebKitTabToLinksPreferenceKey -bool true
#defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true
#defaults write -app Safari WebKitTabToLinksPreferenceKey -bool true
#defaults write -app Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2TabsToLinks -bool true

# Show the full URL in the address bar (note: this still hides the scheme)
defaults write com.apple.Safari ShowFullURLInSmartSearchField -bool true
defaults write -app Safari ShowFullURLInSmartSearchField -bool true

# Set Safari’s home page to `about:blank` for faster loading
defaults write com.apple.Safari HomePage -string "about:blank"
defaults write -app Safari HomePage -string "about:blank"

# Prevent Safari from opening ‘safe’ files automatically after downloading
#defaults write com.apple.Safari AutoOpenSafeDownloads -bool false
defaults write -app Safari AutoOpenSafeDownloads -bool false

# Allow hitting the Backspace key to go to the previous page in history
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true
defaults write -app Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2BackspaceKeyNavigationEnabled -bool true

# Hide Safari’s bookmarks bar by default
defaults write com.apple.Safari ShowFavoritesBar -bool false
defaults write -app Safari ShowFavoritesBar -bool false

# Hide Safari’s sidebar in Top Sites
#defaults write com.apple.Safari ShowSidebarInTopSites -bool false
#defaults write -app Safari ShowSidebarInTopSites -bool false

# Disable Safari’s thumbnail cache for History and Top Sites
defaults write com.apple.Safari DebugSnapshotsUpdatePolicy -int 2
defaults write -app Safari DebugSnapshotsUpdatePolicy -int 2

# Enable Safari’s debug menu
defaults write com.apple.Safari IncludeInternalDebugMenu -bool true
defaults write -app Safari IncludeInternalDebugMenu -bool true

# Make Safari’s search banners default to Contains instead of Starts With
defaults write com.apple.Safari FindOnPageMatchesWordStartsOnly -bool false
defaults write -app Safari FindOnPageMatchesWordStartsOnly -bool false

# Remove useless icons from Safari’s bookmarks bar
defaults write com.apple.Safari ProxiesInBookmarksBar "()"
defaults write -app Safari ProxiesInBookmarksBar "()"

# Enable the Develop menu and the Web Inspector in Safari
defaults write com.apple.Safari IncludeDevelopMenu -bool true
defaults write com.apple.Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true
defaults write -app Safari IncludeDevelopMenu -bool true
defaults write -app Safari WebKitDeveloperExtrasEnabledPreferenceKey -bool true
defaults write -app Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled -bool true

# Add a context menu item for showing the Web Inspector in web views
defaults write NSGlobalDomain WebKitDeveloperExtras -bool true

# Enable continuous spellchecking
defaults write com.apple.Safari WebContinuousSpellCheckingEnabled -bool true
defaults write -app Safari WebContinuousSpellCheckingEnabled -bool true
# Disable auto-correct
#defaults write com.apple.Safari WebAutomaticSpellingCorrectionEnabled -bool false
#defaults write -app Safari WebAutomaticSpellingCorrectionEnabled -bool false

# Disable AutoFill
defaults write com.apple.Safari AutoFillFromAddressBook -bool false
#defaults write com.apple.Safari AutoFillPasswords -bool false
#defaults write com.apple.Safari AutoFillCreditCardData -bool false
#defaults write com.apple.Safari AutoFillMiscellaneousForms -bool false
defaults write -app Safari AutoFillFromAddressBook -bool false
#defaults write -app Safari AutoFillPasswords -bool false
#defaults write -app Safari AutoFillCreditCardData -bool false
#defaults write -app Safari AutoFillMiscellaneousForms -bool false

# Warn about fraudulent websites
defaults write com.apple.Safari WarnAboutFraudulentWebsites -bool true
defaults write -app Safari WarnAboutFraudulentWebsites -bool true

# Disable plug-ins
defaults write com.apple.Safari WebKitPluginsEnabled -bool false
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false
defaults write -app Safari WebKitPluginsEnabled -bool false
defaults write -app Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled -bool false

# Disable Java
defaults write com.apple.Safari WebKitJavaEnabled -bool false
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false
defaults write -app Safari WebKitJavaEnabled -bool false
defaults write -app Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaEnabled -bool false

# Block pop-up windows
defaults write com.apple.Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false
defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false
defaults write -app Safari WebKitJavaScriptCanOpenWindowsAutomatically -bool false
defaults write -app Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically -bool false

# Disable auto-playing video
#defaults write com.apple.Safari WebKitMediaPlaybackAllowsInline -bool false
#defaults write com.apple.SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false
#defaults write com.apple.Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false
#defaults write com.apple.SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false
#defaults write -app Safari WebKitMediaPlaybackAllowsInline -bool false
#defaults write -app SafariTechnologyPreview WebKitMediaPlaybackAllowsInline -bool false
#defaults write -app Safari com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false
#defaults write -app SafariTechnologyPreview com.apple.Safari.ContentPageGroupIdentifier.WebKit2AllowsInlineMediaPlayback -bool false

# Enable “Do Not Track”
defaults write com.apple.Safari SendDoNotTrackHTTPHeader -bool true
defaults write -app Safari SendDoNotTrackHTTPHeader -bool true

# Update extensions automatically
#defaults write com.apple.Safari InstallExtensionUpdatesAutomatically -bool true
#defaults write -app Safari InstallExtensionUpdatesAutomatically -bool true

###############################################################################
# Mail #
Expand Down

0 comments on commit 65cec7c

Please sign in to comment.