Original image by キノスケ
dotfile
?
What is Dotfiles are similar to what Windows users would call hidden files. They are often used to customize UNIX systems. The name dotfiles comes from a UNIX convention where hidden file's name starts with a .
(dot). 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". 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. |