Giter Site home page Giter Site logo

mac_os-config's Introduction

macOS Configuration

Shell scripts for customized macOS machine setup and configuration.

This project provides a highly opinionated default configuration built upon the macOS project. Should the configuration provided by this project not be to your liking, feel free to fork and customize for your specific needs.

Features

Due to the amount of tooling used, the following features are broken down into subsections for easier navigation.

Non-App Store Applications

Installs the following macOS applications which are not located in the App Store:

Node Packages

Installs the following Node packages:

None are used at the moment.

Rust Crates

Installs the following Rust crates:

Requirements

  1. Apple Silicon hardware.

  2. macOS

  3. Xcode

Setup

To install, run:

git clone https://github.com/bkuhlmann/mac_os-config.git
cd mac_os-config
git checkout 26.1.0

Usage

The following will walk you through the steps of installing/re-installing your machine.

Pre-Install

Ensure you have the following in place for your Silicon machine:

  1. Ensure a backup of your Apple, NAS, backup image, and Dropbox credentials are available.

  2. Ensure a recent backup of your machine exists and works properly.

  3. Ensure Startup Security Utility is disabled.

    1. Turn off your machine.

    2. Start your machine by pressing and holding the POWER button until you see startup options being loaded.

    3. Select Utilities → Startup Security Utility from the main menu.

    4. Select Reduced Security.

    5. Quit the utility and restart the machine.

Install

  1. Create a macOS Boot Disk and follow instructions.

  2. Ensure latest software updates are applied per macOS Requirements.

  3. Ensure Xcode is installed per macOS Requirements.

  4. Run macOS Install and follow all prompts.

Post-Install

The following are additional steps, not easily automated, that are worth completing after the install scripts have completed:

  • System Preferences

    • Apple ID

      • Login (if not already).

      • Update avatar.

      • Configure iCloud.

      • Enable Find My Mac.

    • Bluetooth

      • Reconnect keyboard, mouse, and earbuds.

    • Sound

      • Disable Play sound on startup.

      • Disable Play user interface sound effects.

    • Screen Time

      • Disable entire feature.

    • General

      • AirDrop & Handoff

        • Disable AirPlay Receiver so you can run Rack applications on Port 5000.

      • Login Items

        • Ensure only Alfred is listed.

      • Language and Region

        • Set First day of week to Monday.

        • Set Date format to YYYY-MM-DD.

    • Appearance

      • Use Auto theme.

    • Control Center

      • Disable Battery and Spotlight from showing in Menu Bar.

    • Privacy & Security

      • Enable FileVault.

    • Wallpaper

      • Select custom image from Documents.

    • Screen Saver

      • Use Message with custom text.

    • Battery

      • Click Options and enable Prevent automatic sleeping on power adapter when the display is off.

    • Lock Screen

      • Set Start Screen Saver when inactive for 5 minutes.

      • Set Turn display off on battery when inactive for 2 minutes.

      • Set Turn display off on power adapter when inactive for 10 minutes.

      • Set Require password after screen saver begins or display is turned off for 5 minutes.

      • Set Show message when locked. Example: <url> | <email> | <phone>.

    • Touch ID & Password

      • Rename fingerprint.

      • Enable use of Touch ID for all settings.

      • Enable use of Apple Watch.

    • Users & Groups

      • Update avatar image.

      • Remove unused login items.

      • Disable guest account.

    • Internet Accounts

      • Add all accounts.

    • Wallet & Apple Pay

      • Reenable all accounts and assign default card.

    • Keyboard

      • Set Key repeat rate to max level.

      • Set Delay until repeat to short (max) level.

      • Keyboard Shortcuts

        • Select Launchpad and Dock and uncheck Turn Dock Hiding On/Off.

        • Select Mission Control and assign CONTROL + OPTION + COMMAND + N to Show Notification Center.

        • Select Screenshots and uncheck all boxes.

        • Select Spotlight and uncheck all boxes.

    • Printers & Scanners

      • Add printer/scanner.

  • iStat Menus

    • Double click, within the Applications folder, to install as a system preference.

  • Carbon Copy Cloner

    • Notifications

      • Disable Allow notifications when the display is sleeping.

      • Disable Allow notifications when the screen is locked.

      • Disable Allow notifications when mirroring or sharing the display.

      • Disable Show notifications on lock screen and Play sound for notification for all applications.

    • Rename old backup, create new backup, and schedule frequency.

Keyboard Shortcuts

Several applications provide global hotkey support. These are the associations I use (which are also captured in the restore.bom as well):

  • COMMAND + SPACE (hold): Siri (open)

  • COMMAND + SPACE: Spotlight (open)

  • CleanShot - See article for details.

  • CONTROL + OPTION + COMMAND + b: Bartender (hidden menu toggle)

  • CONTROL + OPTION + COMMAND + c: Pika (copy color)

  • CONTROL + OPTION + COMMAND + d: Alfred Define (use OPTION to open Dictionary)

  • CONTROL + OPTION + COMMAND + h: Alfred Highlight Syntax

  • CONTROL + OPTION + COMMAND + k: Keymou (cursor highlight show/hide)

  • CONTROL + OPTION + COMMAND + m: Moom (show/hide)

  • CONTROL + OPTION + COMMAND + n: Notification Center (show/hide)

  • CONTROL + OPTION + COMMAND + o: Alfred Open URL in default browser

  • PixelSnap - See article for details.

  • CONTROL + OPTION + COMMAND + r: Resolutionator (selector)

  • CONTROL + OPTION + COMMAND + t: Alfred Large Type

  • CONTROL + OPTION + COMMAND + w: Mission Control

  • CONTROL + OPTION + COMMAND + ←: Keymou (move cursor left)

  • CONTROL + OPTION + COMMAND + ↑: Keymou (move cursor up)

  • CONTROL + OPTION + COMMAND + →: Keymou (move cursor right)

  • CONTROL + OPTION + COMMAND + ↓: Keymou (move cursor down)

  • CONTROL + OPTION + COMMAND + ENTER: Keymou (move cursor by division)

  • CONTROL + OPTION + SPACE: OmniFocus (quick entry)

  • OPTION + SPACE: Alfred (open)

Newsyslog

Native to macOS, newsyslog can be used to configure system-wide log rotation across multiple projects. It’s a good recommendation to set this up so that disk space is carefully maintained. Here’s how to configure it for your system, start by creating a configuration for your projects in the /etc/newsyslog.d directory. In my case, I use the following configurations:

  • /etc/newsyslog.d/alchemists.conf

      # logfilename                                            [owner:group]    mode   count   size  when  flags
      /Users/bkuhlmann/Dropbox/Development/Work/**/log/*.log                    644    2       5120  *     GJN
  • /etc/newsyslog.d/homebrew.conf

      # logfilename                   [owner:group]    mode   count   size    when  flags
      /usr/local/var/log/**/*.log                      644    2       5120    *     GJN

These configurations ensure that logs are rotated every 5MB (5120KB). In order to test that these configurations are valid, run:

sudo newsyslog -nvv

If you don’t see any errors in the output, then your configuration settings are correct.

The last thing to do is to add a launch configuration to ensure the log rotations happen at regularly scheduled intervals. To do this create the following file: $HOME/Library/LaunchAgents/com.apple.newsyslog.plist. It should have the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.apple.newsyslog</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/sbin/newsyslog</string>
  </array>
  <key>LowPriorityIO</key>
  <true/>
  <key>Nice</key>
  <integer>1</integer>
  <key>StartCalendarInterval</key>
  <dict>
    <key>Minute</key>
    <integer>30</integer>
  </dict>
</dict>
</plist>

That’s it. System-wide log rotation is setup for your projects.

Customization

While this project’s configuration is opinionated and tailored for my setup, you can easily fork this project and customize it for your environment. Start by editing the files found in the bin and lib directories. Check out the macOS Customization Documentation for further details.

TIP: The installer determines which applications/extensions to install as defined in the settings.sh script. Applications defined with the “APP_NAME” suffix and extensions defined with the “EXTENSION_PATH” suffix inform the installer what to care about. Removing/commenting out these applications/extensions within the settings.sh file will cause the installer to skip these applications/extensions.

Development

To contribute, run:

git clone https://github.com/bkuhlmann/mac_os-config.git
cd mac_os-config

Credits

Engineered by Brooke Kuhlmann.

mac_os-config's People

Contributors

bkuhlmann avatar

Watchers

Wattysaid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.