This is my dotfiles repository.
Visitors to this repository seem to be primarily interested in my GNU/Emacs setup, which is handled in a somewhat "literate" fashion, by virtual of being written in Markdown format:
- .emacs.d/init.el
- This file is read at startup-time by Emacs, and parses then evaluates the content of the corresponding markdown file.
- .emacs.d/init.md
- This is a markdown file which contains the literate configuration which I use for emacs.
Beneath the .emacs.d directory you'll find a number of sub-directories, which are used to group the packages I use in a logical fashion.
Some specific files are highlighted in this summary, but it's worth taking a peak if you want to see everything:
- Language modes
- cfengine, docker, go, hcl, etc, etc.
- Org-Mode Stuff
- org-auto-tag.el add tags to tasks, automatically based on the title of the TODO-task and the list of previously used tags.
org-diary.el
which allows maintaining a simple work-log, or diary.- org-eval.el Execute the contents of named blocks when
org-mode
files are loaded/saved. - org-return.el Follow links via RETURN, even inside table cells.
- Also allows toggling checkboxes via RETURN.
- org-nested.el Allow linking to nested headers, by regexp.
org-tag-cloud.el
which automates keeping a tag-cloud for individualorg-mode
files.- org-utils.el A minimal collection of utility functions.
- Tools
- tools/vertical-space-cleanup.el - Enforce consistent whitespace breaks before headers in markdown and org-mode files.
- tools/resync-packages.el - Update our bundled packages from their upstream locations
- User interface
- ui/mode-line-major.el - Hide all minor-modes from the mode-line.
- ui/my-todo.el - Highlight TODO-comments.
- ui/linkifier.el - Turn text matching regular expressions into links/buttons.
- Unix stuff
- MPC (music player control)
- Autoformat, and lint, perl files on-save.
- Use Package
- A clone of the use-package repository, to keep this repository self-contained.
As you can see the repository contains a bunch of other packages from external sources, they are committed here to make sure they continue to be available even if their upstream source disappears, and so that my repository is standalone.
To resync the remote packages from their latest versions please see the resync-packages.el
file:
- .emacs.d/tools/resync-packages.el - Update our bundled packages from their upstream locations
The bash
setup is pretty minimal, the startup files just source every file located beneath ~/.bash/ (and ~/.bash.local
if it exists). This allows me to group setup in a small number of files which is easier to organize.
This repository was created as a "bare" repository, so that it can track files in my home directory. Because of this the checkout process is a little different than usual.
Here is my recipe for deployment on a new host:
Step one: checkout the repository:
If you wish to get read-only access, and you're never going to push updates:
git clone --bare git://github.com/skx/dotfiles.git ~/dotfiles.git
If you have permission you can pull the repository, and gain access to push it:
git clone --bare [email protected]:skx/dotfiles.git ~/dotfiles.git
Step two: setup a sane alias
alias .DOTFILES="git --git-dir=$HOME/dotfiles.git --work-tree=$HOME/"
Step three: See which files will be over-written in your current home directory:
.DOTFILES status -s -uno
Step four: If no files will be corrupted, or you're happy to replace them, do the necessary:
.DOTFILES checkout -b original_files -f
.DOTFILES commit -a -m 'original files'
.DOTFILES checkout master
Now you're done.
It is perhaps more sane to merely use the github browser to cherry-pick the files and functions you want, but each to their own.
Once you've clone the repository to your local system you'll find that you have a README.md file in your home-directory, which some might find annoying. Ideally I'd not have this in the repository but without the instructions the repository would be hard to find/understand for github users.
You can remove the file like so:
$ .DOTFILES update-index --assume-unchanged README.md
$ rm README.md
If you're curious you can see other files that are being ignored:
$ .DOTFILES ls-files -v | grep ^h
If you ever want to restore the file:
$ .DOTFILES update-index --no-assume-unchanged README.md
Because this repository uses .gitignore
to ignore all files that are not explicitly added it can be hard to spot files that you do want to be tracked.
Remember to use .DOTFILES status --ignored
to see those :)