Skip to content

seeM/dotfiles

Repository files navigation

dotfiles

Contents

Installation

  1. Manually configure macOS settings.

  2. Clone and cd into this repo with submodules:

    $ git clone --recurse-submodules [email protected]:seem/dotfiles ~/dotfiles
    $ cd ~/dotfiles
  3. Install Homebrew.

  4. Install from Brewfile with brew bundle:

    brew bundle install
  5. Install vim plugins using packer:

    $ nvim --headless -c 'autocmd User PackerComplete quitall' -c 'PackerSync'
  6. Manually install remaining MacOS apps.

  7. Link VSCode settings (replace Code\ -\ Insiders with Code if necessary):

    rm ~/Library/Application\ Support/Code\ -\ Insiders/User/settings.json
    rm ~/Library/Application\ Support/Code\ -\ Insiders/User/keybindings.json
    ln -s $(pwd)/vscode/keybindings.json ~/Library/Application\ Support/Code\ -\ Insiders/User/keybindings.json
    ln -s $(pwd)/vscode/settings.json ~/Library/Application\ Support/Code\ -\ Insiders/User/settings.json

MacOS apps

1Password - Password manager

Alacritty - Terminal emulator

I used to use iTerm, but Alacritty feels more lightweight and better suited to how I use the terminal (with tmux).

Alfred - Launcher

Alfred's main advantage over the standard launcher is custom workflows.

Disable ctrl to Show Actions

Since I rebind ctrl-p/n to up/down using Karabiner, this option breaks browsing the search list.

Alfred Preferences → Features → Universal Actions → General → Show Actions (uncheck ctrl).

Flux - Blue light controller

GIMP-2.10 - Image manipulation

Google Chrome - Browser

Extensions:

  • 1Password
  • Vimium (only occasionally use it)
  • Twemex (Twitter sidebar)
  • Some ad blocker

IINA - Video player

Inkscape - Vector graphics

Lots of confusing installation instructions out there, but brew install inkspace seems to work fine.

Karabiner - Keyboard remapping

karabiner.edn is written in the Karabiner domain specific language Goku.

Ensure that both Karabiner and Goku are installed, then stow the karabiner package, and run goku.

Keyboard Maestro – Mac automation

LibreOffice - Office suite

Obsidian - Writing

Rectangle - Window manager

Spotify - Music

Transmission - BitTorrent client

Zoom - Video calls

Zotero - Reference manager

MacOS settings

Dock

  1. In the Dock itself, remove all unneeded applications (probably everything except Finder, browser, terminal, notes).
  2. Open Dock settings.
  3. Decrease Size by eye.
  4. Set Position on screen to Bottom.
  5. Check Automatically hide and show the Dock.
  6. Uncheck Show recent applications in Dock.

Finder

  1. In Finder itself, set to list view.
  2. Open Finder Preferences.
  3. Set New Finder windows show: to your home directory.
  4. Uncheck Open folders in tabs instead of new windows.
  5. Select Tags.
  6. Uncheck all tags.
  7. Select Sidebar.
  8. Check your home directory.
  9. Select Advanced.
  10. Check Show all filename extensions.
  11. Set When performing a search to Search the Current Folder.

Keyboard

  1. Open Keyboard settings.
  2. Set Key Repeat to fastest.
  3. Set Delay Until Repeat to fastest.
  4. Check Use F1, F2, etc. keys as standard function keys on external keyboards.
  5. Select Text tab.
  6. Remove On my way! replacement.

Mouse

  1. Open Mouse settings.
  2. Set Tracking speed to fifth from the right.
  3. Open Accessibility settings.
  4. Select Display on the left.
  5. Select Cursor tab.
  6. Uncheck Shake mouse pointer to locate.

Trackpad

  1. Open Trackpad settings.
  2. Set Click to Light.
  3. Set Tracking speed to fastest.

Language & Region

  1. Open Language & Region > Advanced settings.
  2. Set all cases of Decimal to ..

Terminal apps

See my Brewfile for the full list of terminal applications I use. The most important ones are listed here.

Goku - Simple Karabiner configuration

Homebrew - Package manager

Tmux - Terminal window manager

NeoVIM - Text editor

How I use macOS

Window management with Rectangle

95% of the time I have a single application maximised with Rectanglenot virtual desktops, I'll explain in a sec. I switch between applications using cmd-tab (or cmd-` for different windows of the same application), Alfred (my preferred launcher, via cmd-space), or the dock when using my mouse. The other 15% of the time I have two windows open side-by-side. I resize the Dock to be quite small and set it to only show on hover so that I only see the application I'm using and the thin mac bar on the top (that can't be hidden last I checked).

I never use more than one virtual desktop. I find it inflexible and clunky in terms of both keyboard shortcuts and the animations that you can't seem to disable–for example, when fullscreening a window, or switching between fullscreened windows.

I instead use Rectangle to maximise windows in a single virtual desktop. You're supposed to be able to hold option and click on the green fullscreen button on the top-left of windows to do this, but I've found that it doesn't work properly for some applications. So I use Rectangle instead, which also has customiseable keyboard shortcuts. I only use these shortcuts:

  • control-option-enter: Maximise
  • control-option-left: Left Half
  • control-option-right: Right Half

I find it convenient to use the same keys to move windows across screens (there's an option for this: PreferencesMove to adjacent display on repeated left or right commands). I much less frequently use these too:

  • control-option-up: Top Half
  • control-option-down: Bottom Half

Rectangle also has a Snap windows by dragging option, like Windows, which I like too.

Mac oddities

Here are some behaviours I found very unexpected coming from Windows:

  1. Some windows don't show up in cmd-tab, usually application settings. When that happens I use the "three finger drap up" gesture or ctrl-up to show all windows on my virtual desktop.
  2. In mac, closing all windows of an application doesn't necessarily close the application. It still appears when you cmd-tab and in the dock. Use cmd-q to fully close an application. Caveat: for some reason you can't close the Finder application.
  3. Finder's copy vs cut and paste is very unintuitive. You first "select" a file with cmd-c, then use cmd-v to copy-paste, or cmd-option-v to cut-paste.

Mac keyboard shortcuts

Mac applications often use the same standard keyboard shortcuts. Mac sometimes assumes that you know these, so doesn't make them clear. Here are the shortcuts I use:

  • cmd-: Switch to a given tab. cmd-9 switches to the last tab
  • cmd-{/}: Left/right tab
  • cmd-t: New tab
  • cmd-w: Close a window in an application (or close a tab, depending on the application)
  • cmd-n: New window (I rarely use multiple windows)
  • cmd-o: Open file
  • cmd-s: Save
  • cmd-q: Close an application (and all of its windows)
  • touch id: You can press the Touch ID button to lock your screen

I've setup tmux and Karabiner so that many of these work in the terminal too! I also have the following in my terminal:

  • cmd-h/j/k/l: Left/down/up/right pane
  • cmd-h/j/k/l: Left/down/up/right pane
  • cmd-d: Split pane right (think "duplicate")
  • cmd-D: Split pane down (think "duplicate")

Alfred - Launching & switching applications

I use Alfred instead of the defualt launcher. I don't use too many of its features or custom workflows anymore. It's also been a long time since I used the default launcher so I'm not even sure how much they differ anymore.

I mostly use Alfred by pressing cmd-space typing in a few characters to fuzzily search for the application I want to launch or switch to, and hitting return. After a while, you remember short letter combinations (usually two letters) needed for each application. For example, cmd-space ch enter switches to Chrome. Similarly, al for Alacritty (terminal), ob for Obsidian (notes), di for Discord, and so on.

It also has a built-in calculator which I find very convenient. You can type basic math directly into the search prompt and hit enter to paste the result into your clipboard.

The only custom workflow I use these days is for emojis, since not every application has a nice emoji auto-completer. I used to use a custom workflow that I wrote to open GitHub repos in my browser without needing any access to GitHub itself (via the git remote URL). I don't know why I stopped–it's very convenient!