Giter VIP home page Giter VIP logo

homer's Introduction

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 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.

Testing

Install eldev and run:

eldev test

From inside this directory.

homer's People

Contributors

joshuaharry avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.