My dotfiles
Find a file
2024-04-29 18:22:54 +01:00
gnupg Move gpg config into dotfiles repo 2024-04-29 18:22:54 +01:00
powerline Some prior work on powerline 2018-04-14 18:21:43 +01:00
vim Don’t use a colorscheme with vim that might clash with the terminals own scheme 2018-06-20 18:59:08 +01:00
zsh Add support for using dark/light mode 2024-03-22 15:59:05 +00:00
.gitmodules Add vim stuff 2016-05-13 08:23:58 +01:00
bootstrap.sh Move gpg config into dotfiles repo 2024-04-29 18:22:54 +01:00
brew.sh Add hub and correct vim flags 2018-06-16 21:19:27 +01:00
curlrc Add cURL settings 2016-04-07 21:42:11 +01:00
gitconfig Update gitconfig with better settings, especially for delta 2024-02-17 14:54:15 +00: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
ncmpcpp Update where music is stored for ncmpcpp 2018-08-13 19:10:38 +01:00
osx.sh Improve inital install of apps/settings 2018-06-16 21:16:40 +01:00
README.md Update README with auto dark mode info 2024-03-22 16:04:02 +00:00
sheldon.toml Add sheldon config file, fix PATH setup 2022-07-16 11:34:53 +01:00
starship.toml Increasse command timeout so more info can be shown in the prompt 2024-02-08 17:50:28 +00:00
tmux Fix error sourcing the fig tmux file if it does not exist 2023-06-23 18:05:37 +01:00
zshrc.zsh Use homebrew shellenv 2024-04-29 18:12:15 +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. This derives from not wanting anyone to accidentally commiting as me to git, that would however require people to use this repo, unlikely. 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 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. 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.