New laptop time! Another lap around the sun, and another chance to re-learn how to invert the default scroll direction on my Apple machine. This post is for future me, and possibly present you.
Mac UX changes
I tend to really like most design choices Apple makes. Except for the following, which I tend to slowly turn off as a stumble into them.
This is on Sonoma 14.4.1
.
Reversing touchpad scroll direction
There's nothing natural about letting users get accustomed to something, and then naming the opposite thing "natural". Flipping this back to the way it started out.
- Open System Settings from the Apple menu
- Open Trackpad settings
- Tap the Scroll & Zoom tab
- Turn off Natural scrolling
Disabling "double space periods"
Macs have a default setting where if you type two spaces after a word, the first will be replaced with a period (...assuming you forgot to end a sentence?).
Let's turn this off.
- Open System Settings from the Apple menu
- Open Keyboard settings
- Under Text Input > Input Sources, select Edit
- Toggle off the Add period with double-space flag
Disabling hot corners
Macs also have a setting where you can conjure a special action by moving the mouse to a corner. This is unnecessary for me, since I'm happy opening Notes and other programs using Spotlight (β + {SPACE}
).
Let's turn off the default action of creating a note when mousing into the bottom right corner (the only one configured out of the box).
- Open System Settings from the Apple menu
- Open Desktop & Dock settings
- Scroll to the bottom and pick Hot Corners...
- Remove the configuration for the bottom right corner action
Disabling the emoji picker
I don't really need the emoji picker to be accessible from the tap of a single key, and based on my physical keyboard, it's quite possible to fat finger the π key and interrupt typing.
Let's free up that binding since I have no use for it - easy enough to add emoji directly in iMessage.
- Open System Settings from the Apple menu
- Open Keyboard settings
- In the row labeled Press π key to, hit the select control and choose Do Nothing
Disabling dock app suggestions
Lastly, let's turn off the "pin recent items to the dock" functionality that bloats the dock.
- Open System Settings from the Apple menu
- Open Desktop & Dock settings
- Turn off the toggle for Show recent applications in Dock
iTerm2 customization
I'm not sure what most folks use these days, but I've been using iTerm2
and zshell
for quite some time. Just have a couple navigation and "word" handling changes to make.
Setting up word deletion
This means I can hit the left option key and delete, and delete the previous "word" until we find "whitespace".
$ foo bar bazβ
<hits OPT + DEL>
$ foo barβ
I'm sure there are fancy ways to alter what counts as whitespace, but I don't know them.
- Open Preferences for
iTerm2
(shortcut isβ + ,
) - Navigate to the Profiles tab
- Hit the Keys sub tab for the default profile
- Hit the Key Mappings sub sub tab
- Under Presets..., enable Natural Text Editing
Careful! This will reset key mappings associated with this profile. If you run this after setting up other custom bindings, you may have to create them again.
Option keys shifting by word boundaries
I find it easier to jump around in a terminal while holding the option key and using the directional arrows (read: I never learned vim).
- Open Preferences for
iTerm2
(shortcut isβ + ,
) - Navigate to the Profiles tab
- Hit the Keys sub tab for the default profile
- Make sure that the option key you favor acts as escape (
Esc+
)
Hit the Key Mappings sub sub tab
Create a key mapping for
β₯ + β
to send the the escape sequenceb
Create another that uses
β₯ + β
to send the escape sequencef
Try it out in a terminal to make sure you can bounce around to your liking.
Start new tabs in current directory
I prefer the current working directory to be preserved when I open new tabs in iTerm2
.
- Open Preferences for
iTerm2
(shortcut isβ + ,
) - Navigate to the Profiles tab
- Select Reuse previous session's directory under Working Directory
Git config
Most aliases and setup I use for git
are already covered in my post on Commit Hygiene, but there's one I missed.
git branch
Disabling the pager for I don't like having less
configured to show me the couple branches I may have locally.
Run the following from a command line:
git config --global pager.branch false
Brew and friends
Can't install anything on a Mac without brew
- installation instructions here: https://brew.sh/.
Packages
I use ag
for searching and tree
for visually looking at file and folder layouts.
With brew
installed, we can set add these with:
brew install ag
brew install tree
Here's a little demo of each:
β public git:(mac-setup) β tree -L 2 | head
.
βββ feed.xml
βββ search.json
βββ static
βΒ Β βββ favicons
βΒ Β βββ images
βββ tags
βββ asdf
βββ bash
βββ canada
β public git:(mac-setup) β tree -L 2 | ag react
βββ react