Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into acourtneybrown/blueto…
Browse files Browse the repository at this point in the history
…oth-in-menubar

* origin/main:
  Move around some installs between Brewfiles (#168)
  Enable "Control Center >> VPN" "Show in Menu Bar" (#175)
  Default function keys to F# on Arm-based Macs (#172)
  Install Rosetta2 during os-setup on ARM-based Macs (#171)
  • Loading branch information
acourtneybrown committed Sep 26, 2023
2 parents f3208a4 + d9386a5 commit 1df859e
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 3 deletions.
5 changes: 5 additions & 0 deletions script/lib/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
7 changes: 7 additions & 0 deletions script/lib/macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ EOF
(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"
defaults write com.apple.controlcenter "NSStatusItem Visible Bluetooth" -bool true

# 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"
}
Expand Down Expand Up @@ -290,6 +294,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

Expand Down
1 change: 1 addition & 0 deletions script/lib/resources/Brewfile.confluent
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions script/lib/resources/Brewfile.mac
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions script/lib/resources/Brewfile.personal
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ cask "sonos"
cask "steam"
cask "subler"
cask "synology-drive"
cask "virtualbuddy"
cask "vlc"
cask "vmware-fusion"

Expand Down
4 changes: 4 additions & 0 deletions script/lib/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]]
}
Expand Down
3 changes: 3 additions & 0 deletions script/os-setup
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1df859e

Please sign in to comment.