Skip to content

Latest commit

 

History

History
84 lines (64 loc) · 3.13 KB

README.md

File metadata and controls

84 lines (64 loc) · 3.13 KB

Original image by キノスケ

What is a dotfile?

Dotfiles are similar to what Windows users would call hidden files, and they are often used to customize UNIX systems. Since you're here, surely you know what .bashrc or .profile files do, right? Dotfiles are those files. The name dotfile comes from a UNIX convention where hidden file's name starts with a .(dot). I can hear people going "Wow, no shit, Sherlock!" over this...

This convention traces its origin back to old UNIX where (by unintentional side effect) files starting with . became invisible by some programs. People exploited this "bug" to make files hidden, and the UNIX community finally adopted this as a "feature".1 Remember: it's not a bug; it's a feature.

How to use

Though it isn't made to install dotfiles on systems, GNU stow provides a nice interface for installing dotfiles by creating symbolic links automatically. But, I, having too much free time that I should've spent doing something far more useful, created a "package manager" that installs binary dependencies as well.

First, clone the repository into your favorite location. Don't forget to initialize submodules as some features depend on submodules.

git clone --recurse-submodules https://github.com/RangHo/dotfiles ~/Dotfiles

Then cd into the directory you chose.

cd ~/Dotfiles

Now you should initialize dotfile manager by running this script below. Provide sudo password if necessary.

./dotfile init

By now, the dotfile script should have installed itself in ~/.local/bin directory. It is just for convenient access, so you may still use the script directly.

To install a dotfile package, run the following command:

dotfile install <package>
# ... where <package> is a directory that contains `pkginfo` file

List of commands

Here are complete list of commands:

Command What it does
dotfile install <package> Installs a package named <package>. It installs dependencies too.
dotfile uninstall [--force] <package> Uninstalls a package named <package>. Note that this does not uninstall binary dependencies.
dotfile update Updates the dotfiles repository. This feature is not tested rigorously, so use with caution.
dotfile remove Remove all packages from the machine. It does not guarantee that all artifacts are removed also.

Screenshots

image image image

Footnotes

  1. See this post by Rob Pike about this whole shenanigans. Well, kinda, because Google killed Google+.