Skip to content
Rafi's workstations (Archlinux, osx) ~/.config.
Shell Objective-C Python Vim script CSS Ruby Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Zeal
ag
alacritty
ansible
aria2
bash Improve bash related settings Oct 22, 2019
beets
bspwm
bugwarrior
clerk
cpan
ctags
cvim
dunst
fontconfig
gemrc
git
gtk-2.0
gtk-3.0
herbstluftwm Shell misc changes Dec 26, 2015
htop
httpie
i3 i3 remove workspaces 9-10, enable i3-focus, fix rofi Sep 24, 2016
i3status
ideavim
ipython/profile_default Update many config files Jul 4, 2017
karabiner
khd
kwm
launch
lesskey
lf
mad
meld More util confs Aug 15, 2014
mimi
mpd
mpd_sima
mpdscribble
mplayer
mppc
mpv
mysql
ncmpc
ncmpcpp
npm
pacaur
pacman
percol.d
pgcli
psql
qutebrowser Adding qutebrowser conf Nov 2, 2014
ranger
redshift
rtorrent
st
surfraw
sxhkd
sxiv/exec
systemd/user
task
teiler
termite
tmux Few tweaks: Use chafa in lf, use battery script Jan 29, 2019
urxvt
weechat
wego
xorg
yamllint Disable yamllint 'truthy' inspection May 16, 2017
.gitattributes
.gitignore
.gitmodules Remove nvim and phpstorm as submodules Oct 22, 2019
.stignore
.vintrc Introduce Vint config Nov 1, 2018
Brewfile Brewfile: Add many applications Feb 15, 2019
README.md Improve README.md Feb 16, 2019
archey3.cfg
clean.sed
dive.yaml
mkdirs.sh

README.md

Rafael Bodill's macOS/Archlinux dotfiles

This is my entire "dotfiles" configuration for all the software I use on macOS & Archlinux, mostly in the terminal.

I've turned my ~/.config directory into a Git repository and strive to set applications write their configuration there if they don't by default. Meaning, I try to conform to the XDG standard. There is one important caveat in doing so: Secrets can be accidentally committed. I solve this with the clean and smudge filter features of Git attributes.

Install

There is no installation script, but you should create several symlinks:

# Clone the .config repo
cd ~
git clone --recursive git://github.com/rafi/.config.git

# Symlink few files manually:
cd ~
ln -s .config/ag/ignore .agignore
ln -s .config/bash/bashrc .bashrc
ln -s .config/bash/profile .profile
ln -s .config/ctags/config .ctags
ln -s .config/tmux/config .tmux.conf

# Create cache directories
mkdir -p ~/.cache/vim/{backup,complete,session,swap,tags,undo}
mkdir -p ~/.cache/{aria2,beets,mpd,mpdscribble,mutt,pacaur,rtorrent,subtitles,z}
mkdir -p ~/.cache/ncmpcpp/lyrics
mkdir -p ~/.cache/node/{npm,gyp}

# Create user local shared directories
mkdir -p ~/.local/bin
mkdir -p ~/.local/share/{cargo,composer,fonts,vagrant,mutt,newsbeuter,virtualbox}
mkdir -p ~/.local/share/python/envs

OSX-specific Software

XDG Conformity

Configuration directories are organized neatly by defining specific environment variables in bash/exports and aliases in bash/aliases.

There are some programs you'll need to create custom scripts to load the proper config files: bug-warrior, mpdscribble, mutt, mysql, ncmpc, ncmpcpp, rtorrent. See examples at github.com/rafi/.local.

Protecting Secrets

Using .gitattributes filters clean and smudge. Setup custom filters:

cd ~/.config
git config --local filter.vault.clean "sed -f ~/.config/clean.sed"
git config --local filter.vault.smudge "sed -f ~/.config/smudge.sed"

The sed script clean.sed is included. However, you have to create the smudge.sed script yourself, for example:

cat > ~/.config/smudge.sed
s/{{ \(DIANA\|ARIA2\)_TOKEN }}/secret/
s/{{ LASTFM_USER }}/username/
s/{{ LASTFM_TOKEN }}/token/
s/{{ LASTFM_PASS }}/token/
s/{{ SPOTIFY_USER }}/username/
s/{{ SPOTIFY_PASS }}/password/
s/{{ ECHONEST_TOKEN }}/token/
s/{{ JIRA_URL }}/url/
s/{{ JIRA_USER }}/username/
s/{{ JIRA_PASS }}/password/
s/{{ GIT_\(PERSONAL\|WORK\)_NAME }}/Joe Shmoe/
s/{{ GIT_PERSONAL_EMAIL }}/name@gmail.com/
s/{{ GIT_WORK_EMAIL }}/name@work.com/
s/{{ GIT_\(PERSONAL\|WORK\)_USER }}/joe/
s/{{ WEATHER_TOKEN }}/token/
s/{{ HOMEBREW_GITHUB_API_TOKEN }}/token/
s/{{ TMUX_SPOTIFY_API_KEY }}/token/

Now whenever you stage files, the clean.sed will prevent secrets being committed. And on checkout, the smudge.sed will inject your secrets into their proper placeholders. Note that smudge.sed is ignored from being committed mistakenly.

You can’t perform that action at this time.