Skip to content

AdamDewberry/mac-setup

Repository files navigation

Mac Setup

This repo is a quickstart to supercharge your development environment on a Macbook.

It will configure your machine and install many essential tools for collaboration and engineering.

Fresh installs

If your machine image is new and you don't have any tools like git installed yet, you can either export a zip of this repository to obtain the makefile or run the following commands to copy the makefile to your machine to run via the terminal, which makes calls back to the raw github pages to grab any other components required during the setup process.

curl https://raw.githubusercontent.com/AdamDewberry/mac-setup/main/makefile >> ~/makefile    

Developer Tools

Mac developer tools is required to run make, along with many other operations and tools that you will use day to day. When running make, it will automatically prompt you to install the tool set.

Productivity apps

The makefile should download, install and open homerow & KeyboardScroller; here's a brief run down on how to use them.

Remapping keys

Be aware that it will also remap:

  • Caps Lock to Left Control
  • § (x064) to F11 (x044) (which we'll configure to left mouse click)
  • Fn (0xFF00000003) to F12 (x045) (which we'll configure to right mouse click)

If you do not want this, remove or comment out the section remap_keys.

Set the pointer control actions here:

System Preferences -> Accessibility -> Pointer Control -> Enable alternative pointer actions -> check F11 is set for left mouse click

For reference, here are the keyboard remapping IDs and this utility is great at writing the remappings for you.

zsh

The setup includes writing (or overwriting) the zsh profile found in ~/.zshrc; this will configure your shell, add a bunch of useful path env vars and aliases. This is optional, remove the line in the makefile if you wish to start afresh.

Run Mac Setup

To run, navigate to your home directory:

cd ~
/usr/bin/make -i email_address=[your-email]

The flag -i will skip on error and continue.

git preferences

For signing commits, you will need to add the ID of the GPG key generated: this will be on the pub line from:

gpg --list-keys

to configure that key:

git config --global user.signingkey <your-key>

If you're having issues with signing commits, try:

git config --global gpg.program gpg
git config --global commit.gpgSign true

Then run your commit again.

You may need to log into the GitHub CLI again to configure that key against your GitHub account; alternatively do it in the console.

Default Paramets [wip]

Individual application preferences can be found in ~/Library/Preferences/ as .plist files.

These binaries can be converted to xml to be human readable, update individual values and convered back to binaries for Mac OS to read.

To convert a plist file to xml, use plutil:

plutil -convert xml1 /path/com.apple.controlcenter.plist     

and back to binary format:

plutil -convert binary1 /path/com.apple.controlcenter.plist

To do

  • Change resolution
  • Add HOME directory to finder favourites
  • Export app preferences as .plist files and write them to ~/Library/Preferences/

Notes

Editing plists Sidebar plist

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published