Dr Timothy Corbett‑Clark

CTO, Researcher, Developer

My computer setup, tools, and tips

This page helps me when setting up a new computer, and provides an overview to assess for consistency and compatibility.

Hardware

  • Computer: Mac Mini (2024) M4 10 core, 32GB RAM, 512GB SSD
  • Monitor: BenQ PD27305
  • Keyboard: Durgod Taurus K320, configured using Karabiner-Elements.

Software management

Desktop

Programming

Data Science

LLMs

  • Running local models: Ollama
  • Command line (local and remote): LLM

Researching and writing

  • Writing (PDFs): typst
  • Research notes: Zotero
  • General notes: Apple notes

Apps

To install all apps (list created using brew list --casks -1):

brew install -q --cask \
    alacritty \
    font-fira-code \
    font-fira-code-nerd-font \
    font-noto-emoji \
    karabiner-elements \
    ollama \
    raycast \
    rectangle \
    zotero

Note this includes the Fira Code font with programming ligatures.

Commandline tools

To install all my usual packages (list created using brew leaves -r):

brew install -q \
    bat \
    bottom \
    colima \
    curl \
    docker \
    duckdb \
    dust \
    eza \
    fastfetch \
    ffmpeg \
    fish \
    git \
    jq \
    libffi \
    mkcert \
    oven-sh/bun/bun \
    qemu \
    sqlite \
    starship \
    tidy-html5 \
    uv \
    zlib

Note the better versions of standard tools:

Configuration

Keyboard

I remap the modifier keys on my Durgod K320 using Karabiner-Elements so that:

  • The Windows button is Command/Cmd (was Option/Alt).
  • The Alt button is Option/Alt (was Command/Cmd).
  • The Application button is (right) option.
  • (The Fn key is not seen by the computer but the keyboard itself modifies the function keys).

So the keys across the bottom row become:

Ctrl   ⌥   ⌘   <spacebar>   ⌘   🌐︎   ⌥   Ctrl

where

  • ⌥ is Option/Alt
  • ⌘ is Command/Cmd
  • 🌐︎ is Fn/Globe

Use Karabiner-eventviewer to watch events. See also keycode.info.

Make sure keyboard is set to British, and not for example to Unicode Hex Input.

Fish

The main ~/.config/fish/config.fish contains:

if status --is-login
    # For brew
    fish_add_path -P /opt/homebrew/bin
    brew shellenv fish | source

    # For uv
    uv generate-shell-completion fish | source

    # Add standard unix paths
    fish_add_path -P /usr/local/sbin /usr/sbin /sbin /usr/local/bin /usr/bin /bin

    # Add path to brew-installed curl
    fish_add_path -P (brew --prefix)/opt/curl/bin

    # Add path to anything I have installed locally (e.g. by `uv tool`)
    fish_add_path -P /Users/tcorbettclark/.local/bin

    # Set library path and dynamic library path
    set -x -g LD_LIBRARY_PATH (brew --prefix)/opt/curl/lib (brew --prefix)/lib /usr/lib /lib
    set -x -g DYLD_LIBRARY_PATH (brew --prefix)/opt/curl/lib (brew --prefix)/lib /usr/lib /lib
end

# Make starfish manage the prompt always.
starship init fish | source

Some handy aliases:

alias --save ls eza
alias --save la 'ls -a'
alias --save ll 'ls -l'
alias --save lla 'ls -la'
alias --save lt 'ls --tree'
alias --save va 'source .venv/bin/activate.fish'
alias --save copy-latest-pdf-download 'cp (ls --sort created ~/Downloads/*.pdf | tail -1)'

Tips

Brew

Add the brew-cache extension to make it easy to find which packages own which files:

brew tap ten0s/homebrew-brew-cache

In addition to the usual brew update/upgrade/install/uninstall/list/info:

brew cache -u                             # Create/update cache of files
brew cache -s <file pattern>              # Find packages containing files/directories matching pattern

brew leaves                               # Packages which are not dependencies of other packages
brew leaves -r                            # ...installed manually
brew leaves -p                            # ...installed as dependencies

brew deps --tree <package>                # Dependencies of <package>
brew deps --tree --installed              # ...all packages
brew deps --tree (brew leaves -r)         # ...all manually installed packages, avoiding duplications
brew deps --tree (brew list --casks -1)   # ...all casks

brew autoremove --dry-run                 # Remove (dry run) packages no longer required
brew cleanup -s                           # Remove old versions of packages and cache files

brew doctor                               # Find potential issues

Fish

Find changes made to fish configuration, functions, completions etc since installation:

fish_delta