Episode #318

System Preferences

Series: Setting up a New Mac for Development

9 minutes
Published on January 12, 2018
In this episode we look at some of the basic system preferences on macOS High Sierra. We set up the Dock, Keyboard shortcuts, and show how to customize key repeat timing outside of the preferences window.

Episode Links

  • Alfred - An indispensable tool for launching programs, searching for definitions, contacts, and files, playing music, and managing the pasteboard. This is the first thing I install on a new Mac.

Adjusting Keyboard Repeat Rate

We can adjust the keybaord repeat rate beyond what the preference pane allows. To do this, open terminal and type:

$ defaults write -g InitialKeyRepeat -int 15
$ defaults write -g KeyRepeat -int 2

You can adjust the numbers to be whatever you want the delay to be (in milliseconds).

You'll have to log out and log back in for these settings to take effect.

Disable Press and Hold

This setting, which allows pressing on a key to get a context menu of other related characters to type, often gets in the way of how I use vim and the terminal. To disable it:

$ defaults write -g ApplePressAndHoldEnabled -bool false

Set the hostname

Setting the hostname in System Preferences often doesn't affect what you see in the terminal. To fix this permanently, we can use scutil:

sudo scutil --set HostName <yourcomputername>
sudo scutil --set LocalHostName <yourcomputername>
sudo scutil --set ComputerName <yourcomputername>

That should set all the various names and survive reboots, etc.

This episode uses Macos 10.13.