From 468de26172822889189080871a64ebadee932b64 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 25 Sep 2023 16:10:51 -0700 Subject: [PATCH 1/4] Install Rosetta2 during os-setup on ARM-based Macs (#171) --- script/lib/install.sh | 5 +++++ script/lib/util.sh | 4 ++++ script/os-setup | 3 +++ 3 files changed, 12 insertions(+) diff --git a/script/lib/install.sh b/script/lib/install.sh index 9d943dc6..bb984d87 100644 --- a/script/lib/install.sh +++ b/script/lib/install.sh @@ -83,3 +83,8 @@ function install::xcode_license() { fi fi } + +# install_rosetta2 attempts to install Rosetta2, assuming on ARM-based Mac +install::install_rosetta2() { + softwareupdate --install-rosetta --agree-to-license +} diff --git a/script/lib/util.sh b/script/lib/util.sh index f48f8cc3..9e9a141c 100644 --- a/script/lib/util.sh +++ b/script/lib/util.sh @@ -13,6 +13,10 @@ function util::is_mac() { [[ "$(uname -s)" = "Darwin" ]] } +function util::is_arm() { + [[ "$(uname -m)" = "arm64" ]] +} + function util::is_linux() { [[ "$(uname -s)" = "Linux" ]] } diff --git a/script/os-setup b/script/os-setup index 8c4890b8..38a49449 100755 --- a/script/os-setup +++ b/script/os-setup @@ -28,6 +28,9 @@ if util::is_mac; then # install xcode command line tools install::install_xcode + # install Rosetta 2 on ARM-based Mac + util::is_arm && install::install_rosetta2 + # MacOS customization script # shellcheck disable=SC1091 . lib/macos.sh From 57f06effa760f00c13717b53a29c32173b0abf05 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 25 Sep 2023 17:25:11 -0700 Subject: [PATCH 2/4] Default function keys to F# on Arm-based Macs (#172) --- script/lib/macos.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/script/lib/macos.sh b/script/lib/macos.sh index f68e14cb..ff87b200 100644 --- a/script/lib/macos.sh +++ b/script/lib/macos.sh @@ -288,6 +288,9 @@ function macos::setup_input_devices() { # Keyboard: touchbar Fn keys to "Show Control Strip" defaults write com.apple.touchbar.agent PresentationModeFnModes -dict fullControlStrip functionKeys functionKeys fullControlStrip + # Keyboard: default functions keys to F1, F2, etc + defaults write NSGlobalDomain com.apple.keyboard.fnState -bool true + # Increase sound quality for Bluetooth headphones/headsets defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" -int 40 From 6d4c1430d463ce59fe7821218eb460f406e70132 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 25 Sep 2023 17:51:51 -0700 Subject: [PATCH 3/4] Enable "Control Center >> VPN" "Show in Menu Bar" (#175) --- script/lib/macos.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/script/lib/macos.sh b/script/lib/macos.sh index ff87b200..70fa9292 100644 --- a/script/lib/macos.sh +++ b/script/lib/macos.sh @@ -208,6 +208,10 @@ EOF defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.bluetooth" -bool true (defaults read com.apple.systemuiserver menuExtras | grep -q Bluetooth.menu) || defaults write com.apple.systemuiserver menuExtras -array-add "/System/Library/CoreServices/Menu Extras/Bluetooth.menu" + # VPN: show icon in menu bar + defaults write com.apple.systemuiserver "NSStatusItem Visible com.apple.menuextra.vpn" -bool true + (defaults read com.apple.systemuiserver menuExtras | grep -q VPN.menu) || defaults write com.apple.systemuiserver menuExtras -array-add "/System/Library/CoreServices/Menu Extras/VPN.menu" + # Time & Clock: Show date in menu bar defaults write com.apple.menuextra.clock DateFormat -string "EEE MMM d h:mm a" } From d9386a58d8f2228b37f4ca1792730aa424e96463 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 25 Sep 2023 20:50:24 -0700 Subject: [PATCH 4/4] Move around some installs between Brewfiles (#168) * Move around some installs between Brewfiles * Install VirtualBuddy in personal profile --- script/lib/resources/Brewfile.confluent | 1 + script/lib/resources/Brewfile.mac | 3 --- script/lib/resources/Brewfile.personal | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/script/lib/resources/Brewfile.confluent b/script/lib/resources/Brewfile.confluent index 480c4033..2e6b3327 100644 --- a/script/lib/resources/Brewfile.confluent +++ b/script/lib/resources/Brewfile.confluent @@ -36,6 +36,7 @@ brew "yapf" cask "goland" cask "google-cloud-sdk" cask "intellij-idea" +cask "microsoft-remote-desktop" cask "pycharm" cask "session-manager-plugin" cask "temurin" diff --git a/script/lib/resources/Brewfile.mac b/script/lib/resources/Brewfile.mac index 8f15bd76..d9653edc 100644 --- a/script/lib/resources/Brewfile.mac +++ b/script/lib/resources/Brewfile.mac @@ -56,11 +56,8 @@ cask "iterm2" cask "logitech-camera-settings" cask "maccy" cask "marked" -cask "microsoft-remote-desktop" -cask "selfcontrol" cask "slack" cask "spotify" -cask "steam" cask "sublime-text" cask "zoom" cask "zsa-wally" diff --git a/script/lib/resources/Brewfile.personal b/script/lib/resources/Brewfile.personal index 9cfa4321..1bbb037e 100644 --- a/script/lib/resources/Brewfile.personal +++ b/script/lib/resources/Brewfile.personal @@ -21,6 +21,7 @@ cask "sonos" cask "steam" cask "subler" cask "synology-drive" +cask "virtualbuddy" cask "vlc" cask "vmware-fusion"