Thoughts When Shifting To A New Mac


So at the moment I’m shifting on to a new Mac. I’ve previously been using two, a pretty good MacBook Pro and a terribly slow iMac. Now I have a top of the line MacBook Pro, 16Gb of RAM, 1Tb SSD and an i7 processor. It’s pretty schmick.

Of course there’s a downside to a new Mac. You need to set it up just right and that can take some time. It is considerably easier and less painful in this era of cloud computing.

Apple’s iCloud is the first revelation. You log in to iCloud and down come your internet accounts, the passwords saved in your KeyChain, Safari’s bookmarks (and history it seems) and the Desktop and Downloads folder.

Then we get to installing applications. Almost all the apps I use now come from the Mac App Store so getting them installed is just a matter of opening the App Store and reviewing my list of purchased apps. There are another set of apps I have courtesy of SetApp and those are just as easy to install. Ones required for work are installed via JAMF. That leaves a few quirks; 1Password, Chrome, BBEdit, iTerm, and some others not terribly important. OK, Karabiner Elements is pretty important, we may talk about that later.

Now we have setting up. Safari and Chrome are easy. Most of the apps I install I use the default preferences. The hard ones are iTerm, BBEdit and bash.

Even these are easier in this day of cloud resources. All the dot files and my personal bin directory are stored on github so I can pull them down on to a new Mac in seconds. Even better, inside my personal bin are my favourite font, Input, the Solarized colour schemes for BBEdit, and a shell script brewer that runs a brew install for each line of a text file, brew_me.txt, also in the directory. Yes, I know it’s a trivial script but is saves me remembering and typing:

while read b; do
   brew $b
done <brew_me.txt

I have a number of similar “trivial” scripts. One day I’ll clean them all up and make them public. So what absolutely makes the grade and gets included in brew_me.txt.

bash-completion
coreutils
git
pandoc
source-highlight

I might add one or two later but they are the essentials.

The final useful thing that hides in that folder is the file com.googlecode.iterm2.plist, yes, iTerm2 is capable of reading it’s preferences from any directory you like. It’s set at the bottom of the General preference pane. Makes setting iTerm up easier, store the preference file somewhere that’s part of your git repo and you are done.

Karabiner Elements, my favourite keyboard hacking tool has a new feature, it can import complex modifications from the net via your web browser and they have a web page full of them. The other nice thing about it is the preference file is saved in the .config folder in your home and is easily understood JSON. Much nicer than the XML in a plist and also easily stored in your git repo. I cannot recommend Karabiner Elements too much, it is the perfect tool for such things as changing the caps lock key to something more useful and less dangerous. I have my keyboards set so caps lock on it’s own does nothing, shift-caps lock does a caps lock and if you hold it down and hit another key it becomes a modifier equivalent to holding down Shift-Ctrl-Option-Command. It’s one of the complex mods you can download from the mods page.

Thinking about how iTerm2 and Karabiner Elements handle their preferences you can tell a piece of software that’s been written by a real hacker. They have nice, tiny, touches like these. The same can be seen in the way pandoc looks after it’s own bash completion, you just add eval "$(pandoc --bash-completion)" as a line in your bash profile and there you have it. Now if BBEdit had a similar scheme I’d be in paradise. By the way, if you’re interested in bash completion then running pandoc --bash-completion gets you a damn fine example of how to write one, though you can always go bbedit /usr/local/etc/bash_completion.d and have a look at the complete list.

One thought on “Thoughts When Shifting To A New Mac

Leave a comment