Skip to content

Manage your dotfiles with git bare repositories and Emacs.

License

Notifications You must be signed in to change notification settings

joshuaharry/homer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homer

Dotfile management with git from inside Emacs.

Homer Thinking

Installable with straight.el, use-package, and the following snippet of code:

(use-package homer
  :demand t
  :straight (homer :type git :host github :repo "joshuaharry/homer"))

Feedback welcome.

Motivation

One useful way to track dotfiles involves keeping a git bare repository. This Emacs package builds upon this technique to make tracking these files using Emacs as easy as possible. The workflow here is as follows:

  1. Create a remote repository to host your dotfiles on somewhere like GitHub or GitLab.

  2. Run M-x homeinit to initialize homer. This will create a git bare repository in your home directory and initialize some files needed for homer to work.

Invoking homeinit will create a file called dotfiles.dots inside the directory ~/.config/homer/, although you can change the path by editing the special variable *homer-dotfile-path* as you wish. The file dotfiles.dots describes the files you would like to track. It is structured as follows:

# This is a comment.
~/.config/emacs/init.el
~/.zshrc

# Blank lines are completely ok.

~/.xmonad/xmonad.hs

The ~ will be expanded into your home directory, just like in a shell.

By default, homer will warn you if you have entries in your dotfiles file that don't exist. You can silence the warning (and, indeed, all other non-error messages homer emits) by setting the variable *homer-silent-output* to t.

  1. Run homeadd at any point to stage changes to your dotfiles.

  2. Run homepush to commit those changes and push them to the remote repository you configured initially.

On a day-to-day basis, you'll probably be running homeadd and homepush all the time; you will only invoke homeinit once per machine you use.

  1. If you need to want to adjust the dotfiles you track, run M-x homefix, which opens the file at *homer-dotfile-path* for editing.

Testing

Install eldev and run:

eldev test

From inside this directory.

About

Manage your dotfiles with git bare repositories and Emacs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published