⪼ Made with 💜 by Polyglot.
- mac.dev
- macbook.dev
- macos.dev
What is the state-of-the-art way to setup a new Mac for software development? How do I keep my Mac software up-to-date? How do I get the most out of this non-trivial investment? If I need to setup a new Mac; how do I guarantee that I'll be as efficient on the new Mac as I was on the previous Mac?
The missing Mac Software Developer's Manual (MacBook Developer Setup Guide) Something that took me a really long time to get right as a software engineer is my personal development machine setup. There are several things that need to be in place in order to get this right:
- backing-up installed applications (command-line applications & Native Mac Applications)
- re-storing installed applications (command-line applications & Native Mac Applications)
- backing-up system and application configuration
- re-storing system and application configuration
- Operating system ergonomics (keyboard setup, finder configuration, ...)
Open Safari and navigate to "google.com"; then press
Option + Command + cto open the developer console. You'll likely see some janky logs. To clear those out, you can press theControl + lkey combination; however, the "control" key is in such an inconvenient place on the keyboard, especially for someone who uses the control key so often. It turns out, in MacOS it is easy to remap keys so they function as other keys. I rarely yell on the internet, so, I like to remap the "caps lock" key such that it acts as if it were the "control" key. This can be done on the command-line with thehidutilprogram. Now, going forward, when I'm in the developer console and I want to clear the logs, I can press thecaps lock + land it will function as if I had pressedcontrol + l.
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0}]}'
hidutil property --set '{ "UserKeyMapping": [] }'
cat > ~/Library/LaunchAgents/com.local.KeyRemapping.plist <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.local.KeyRemapping</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hidutil</string>
<string>property</string>
<string>--set</string>
<string>{"UserKeyMapping":[
{
"HIDKeyboardModifierMappingSrc": 0x700000039,
"HIDKeyboardModifierMappingDst": 0x7000000E0
}
]}</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
EOF
less ~/Library/LaunchAgents/com.local.KeyRemapping.plist

