Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .chezmoiscripts/run_onchange_set_mac_os_defaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,15 @@ defaults write com.apple.dock "autohide" -bool "true"

killall Dock

# Safari
defaults write -app Safari "ShowFullURLInSmartSearchField" -bool "true"

# killall fails when Safari isn't running, which is fine
killall Safari 2>/dev/null || true
# Safari — its prefs live in a sandboxed container, so writing them requires
# the terminal to have Full Disk Access (System Settings > Privacy & Security).
# Warn instead of aborting the whole apply when TCC denies the write.
if defaults write -app Safari "ShowFullURLInSmartSearchField" -bool "true" 2>/dev/null; then
# killall fails when Safari isn't running, which is fine
killall Safari 2>/dev/null || true
else
echo "WARNING: Skipped Safari defaults — grant your terminal Full Disk Access and re-run 'chezmoi apply'"
fi

# Finder
defaults write NSGlobalDomain "AppleShowAllExtensions" -bool "true"
Expand Down
Loading