• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

bkuhlmann/mac_os-config: Shell scripts for customized macOS machine setup and co ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

bkuhlmann/mac_os-config

开源软件地址(OpenSource Url):

https://github.com/bkuhlmann/mac_os-config

开源编程语言(OpenSource Language):

Shell 98.5%

开源软件介绍(OpenSource 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:

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 22.4.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

      • Configure iCloud.

      • Enable Find My Mac.

    • Security & Privacy

      • General

        • Require password immediately after sleep or screen saver begins.

        • Enable message when screen is locked. Example: <url> | <email> | <phone>.

        • Allow your Apple Watch to unlock your Mac.

      • FileVault

        • Enable FileVault and save the recovery key in a secure location (i.e. 1Password).

      • Firewall

        • Enable.

        • Automatically allow signed software.

        • Enable stealth mode.

    • Internet Accounts

      • Add all accounts.

    • Touch ID

      • Rename fingerprint.

    • Keyboard

      • Keyboard

        • Slide Key Repeat to Fast (max).

        • Slide Delay Until Repeat to Short (max).

      • 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.

    • Desktop and Screen Saver

      • Select Desktop, click +, and choose custom image.

      • Select Screen Saver, select Message, enter custom message, start after 10 minutes, and check show with clock.

    • Bluetooth

      • Reconnect keyboard, mouse, and earbuds.

    • Network

      • Configure Wi-Fi.

    • Printers & Scanners

      • Add printer/scanner.

    • Users & Groups

      • Update avatar image.

      • Remove unused login items.

      • Disable guest account.

    • Wallet and Apple Pay

      • Reenable all accounts and assign default card.

    • Sound

      • Sound Effects

        • Uncheck Play sound on startup.

        • Uncheck Play user interface sound effects.

      • Battery

        • Click on Battery and uncheck Show battery status in menu bar.

        • Click on Power Adapter and check Prevent computer from sleeping automatically when the display is off.

    • Notifications

      • Do Not Disturb

        • Enable Do Not Disturb from 9pm to 7am.

        • Enable When display is sleeping.

        • Enable When screen is locked.

        • Enable When mirroring.

        • Disable Allow calls from everyone.

        • Enable allow repeated calls.

      • Applications

        • Select Banners for all apps.

        • Disable Show notifications on lock screen.

        • Disable Play sounds for notifications.

  • iStat Menus

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

  • Carbon Copy Cloner

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

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.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mikepj/XRG: System monitor for macOS.发布时间:2022-08-18
下一篇:
acidanthera/CPUFriend: Dynamic macOS CPU power management data injection发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap