This repository contains my personal dotfiles, managed using GNU Stow.
This README is mostly because I forget things.
- Terminal configurations (
bash,ghostty,tmux) - Zed editor settings (
zed, only tracked files, not Zed state likeprompts/) - Git configuration
- Karabiner-Elements config and the
U.S. Svenskakeyboard layout (see below) - Automated setup via
install.sh
git clone https://github.com/erikthorselius/dotfiles.git ~/dev/dotfiles
cd ~/dev/dotfiles./install.shThis installs the packages and applications in Brewfile, then symlinks the
bash, git, ghostty, tmux, zed, and karabiner packages into $HOME
using GNU Stow. Existing Karabiner configuration is moved to a timestamped
backup before linking.
The installer installs Bash but does not change the login shell. On a new Mac,
add Homebrew Bash to /etc/shells once and select it:
brew_bash="$(brew --prefix)/bin/bash"
grep -qxF "$brew_bash" /etc/shells || echo "$brew_bash" | sudo tee -a /etc/shells
chsh -s "$brew_bash"Open a new terminal afterwards and verify with echo "$BASH_VERSION".
Git uses erik.thorselius@gmail.com by default. Repositories below
~/dev/tv4/ include ~/.gitconfig-tv4 and use the TV4 email address instead.
keyboard/layouts/U.S. Svenska.keylayout is U.S. plus å/ä/ö on keys an ANSI
keyboard lacks (ISO §, JIS ¥ and JIS _). Karabiner (karabiner/) sends those
keys for Caps/right ⌥ + [ ' ;, so apps get å/ä/ö without Option held.
Apps that read ⌥ as Alt (Berth, WhatsApp, terminals) then type them fine.
Caps/right ⌥ + i j k l are the arrow keys.
After ./install.sh, log out and in, then add U.S. Svenska under System
Settings → Keyboard → Input Sources and remove U.S.
To rebuild the layout, first select the standard U.S. input source. The dump tool refuses other source layouts to avoid accidentally producing a hybrid:
swift keyboard/tools/dump-layout.swift > us.json
python3 keyboard/tools/build-layout.py us.json "keyboard/layouts/U.S. Svenska.keylayout"Anything machine-specific or sensitive (API tokens, work-only env vars) goes
in ~/.bash_secrets. The file is sourced at the end of .bashrc if present
and is intentionally not tracked by this repo.
# ~/.bash_secrets
export SOME_TOKEN=...