From 7360824eab16fc5b04994fa1761b2d01a81d012a Mon Sep 17 00:00:00 2001 From: Artur Gurgul Date: Sun, 3 Aug 2025 16:53:58 +0200 Subject: [PATCH] add scripts to configure macos --- bin/macos-config/macos-dock.sh | 16 ++++++++++++++++ bin/macos-config/macos-settings.sh | 24 ++++++++++++++++++++++++ bin/macos-config/readme.md | 1 + 3 files changed, 41 insertions(+) create mode 100644 bin/macos-config/macos-dock.sh create mode 100644 bin/macos-config/macos-settings.sh create mode 100644 bin/macos-config/readme.md diff --git a/bin/macos-config/macos-dock.sh b/bin/macos-config/macos-dock.sh new file mode 100644 index 0000000..4bfae25 --- /dev/null +++ b/bin/macos-config/macos-dock.sh @@ -0,0 +1,16 @@ + +defaults write com.apple.dock persistent-apps -array +defaults write com.apple.dock orientation -string "left" +defaults write com.apple.dock autohide -bool true + +#Set icon size +defaults write com.apple.dock tilesize -int 32 + +killall Dock + +## Exporting the settings +# defaults export com.apple.dock ~/dock-backup.plist + +## Restoring +# defaults import com.apple.dock ~/dock-backup.plist +# killall Dock \ No newline at end of file diff --git a/bin/macos-config/macos-settings.sh b/bin/macos-config/macos-settings.sh new file mode 100644 index 0000000..8501430 --- /dev/null +++ b/bin/macos-config/macos-settings.sh @@ -0,0 +1,24 @@ +defaults write com.apple.menuextra.clock ShowSeconds -bool true +defaults write NSGlobalDomain KeyRepeat -int 2 # 2 min -120 max +defaults write NSGlobalDomain InitialKeyRepeat -int 15 + +## If when holding a key you get the accent menu (e.g., “é”, “ö”) instead of repeats: +# defaults write -g ApplePressAndHoldEnabled -bool false + + + +## Control Center Settings +#18 → Show in Menu Bar +#2 → Show in Control Center only +#8 → Don't show at all + +# defaults write com.apple.controlcenter Battery -int 18 +defaults write com.apple.controlcenter Bluetooth -int 18 +defaults write com.apple.controlcenter Sound -int 18 + +killall ControlCenter +killall SystemUIServer + +osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true' +## Toggling the theme mode +#osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode' diff --git a/bin/macos-config/readme.md b/bin/macos-config/readme.md new file mode 100644 index 0000000..f4c205c --- /dev/null +++ b/bin/macos-config/readme.md @@ -0,0 +1 @@ +# Reinstall macOS \ No newline at end of file