My dotfiles
  • Shell 91.5%
  • Lua 8.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonny Barnes 583bbaa533
Move git identity to an included ~/.gitconfig.local
~/.extra ran five `git config --global` writes on every shell startup, to
re-assert identity and signing after bootstrap.sh copies gitconfig over
~/.gitconfig. The dark-mode-notify agent fires on wake/unlock and runs
`pkill -usr1 zsh`, so every shell re-sources .zshrc — and therefore .extra —
simultaneously. `git config` locks with O_EXCL and has no retry or timeout for
config files, so the concurrent writes raced and printed:

    error: could not lock config file /Users/jonny/.gitconfig: File exists

Identity and signing now live in an untracked ~/.gitconfig.local, included
last from gitconfig so it wins over anything above. bootstrap.sh seeds it from
gitconfig.local.template only when absent, so re-runs never clobber the real
signing key. No git writes happen on shell startup at all now.

Verified: fully-resolved config is unchanged apart from the new include.path;
author and committer both resolve from config with no GIT_* env vars set;
existing commits still verify. 12 concurrent sources of .extra are silent,
where the old version produced 27 lock errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 09:57:19 +01:00
bin Update cp-torrent command 2026-04-12 11:24:18 +01:00
claude Switch Claude Code statusline to isaacaudet variant, show 7d usage 2026-08-08 11:54:05 +01:00
ghostty Fox ghostty config 2026-04-02 10:59:23 +01:00
gnupg Move gpg config into dotfiles repo 2024-04-29 18:22:54 +01:00
neovim Add nvim-tree, on the right, toggled with <leader>e 2026-08-08 20:36:39 +01:00
zsh Make tmux work with claude installed via claude.com install.sh script 2026-06-10 15:26:01 +01:00
bootstrap.sh Move git identity to an included ~/.gitconfig.local 2026-08-09 09:57:19 +01:00
brew.sh Add which-key and nvim-web-devicons, tidy brew casks 2026-08-08 14:26:59 +01:00
delta-themes.gitconfig Improvements to lazygit/tmux/ghossty configs 2026-01-30 14:42:51 +00:00
gitconfig Move git identity to an included ~/.gitconfig.local 2026-08-09 09:57:19 +01:00
gitconfig.local.template Move git identity to an included ~/.gitconfig.local 2026-08-09 09:57:19 +01:00
gitignore Add a global gitignore 2016-04-08 03:42:12 +01:00
hushlogin Hush login details 2016-04-08 03:37:25 +01:00
LICENSE Initial commit 2016-03-06 12:50:00 +00:00
macos.sh Update defaults script 2024-06-25 19:12:04 +01:00
README.md Update the README for the repo 2024-06-25 19:42:33 +01:00
sheldon.toml Only load fnm sheldon plugin on macOS 2026-08-04 22:30:41 +01:00
tmux Enable tmux focus-events 2026-08-08 12:00:45 +01:00
zshrc.zsh Stop shadowing BSD coreutils with GNU versions on PATH 2026-08-08 11:53:40 +01:00

dotfiles

Heres my dotfiles, inspired by people like Mathias. See his dotfiles at https://github.com/mathias/dotfiles.

The idea Im currently going down is to create a symlink from $HOME to this directory. There is one exception to this, the .gitconfig file. I dont want actual commiter details committed into this repo. So my git credentials are stored in a .extra file which gets sourced. This then calls the relavent git command, which causes git to edit $HOME/.gitconfig. If that file was a symlink to this repo, then the repo would see the file as edited and the repo would then be in a dirty state, permanently.

Usage

First clone the repo.

As mentioned above my git credentials are stored in an untracked file: $HOME/.extra. This must be manually created, mine looks something like:

# Git credentials
GIT_AUTHOR_NAME="Jonny Barnes"
GIT_COMMITER_NAME="$GIT_AUTHOR_NAME"
git config --global user.name "$GIT_AUTHOR_NAME"
GIT_AUTHOR_EMAIL="jonny@jonnybarnes.uk"
GIT_COMMITER_EMAIL="$GIT_AUTHOR_EMAIL"
git config --global user.email "$GIT_AUTHOR_EMAIL"

Run ./boostrap.sh, this will create all the necessary symlinks, then source .zshrc.

Warning

This is a destructive process, so backup your dotfiles first.

Auto switch between light and dark mode

To switch between dark and light mode automatically, we use a helper lib.

Clone it from https://github.com/bouk/dark-mode-notify then run make and make install.

Then make a script to run is automatically, put the plist where your system can find it: ~/Library/LaunchAgents/ke.bou.dark-mode-notify.plist with the following content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>ke.bou.dark-mode-notify</string>
    <key>KeepAlive</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/Users/jonny/.local/var/log/dark-mode-notify-stderr.log</string>
    <key>StandardOutPath</key>
    <string>/Users/jonny/.local/var/log/dark-mode-notify-stdout.log</string>
    <key>ProgramArguments</key>
    <array>
       <string>/usr/local/bin/dark-mode-notify</string>
       <string>/Users/jonny/git/dotfiles/zsh/dark-mode-notify.zsh</string>
    </array>
</dict>
</plist>

Make the log file and script file point to the right location. For clarity dark-mode-notify.zsh is in this repo.