_______ __ ______ __ __
/ \ / | / \ / |/ |
$$$$$$$ | ______ _$$ |_ /$$$$$$ |$$/ $$ | ______ _______
$$ | $$ | / \ / $$ | $$ |_ $$/ / |$$ | / \ / |
$$ | $$ |/$$$$$$ |$$$$$$/ $$ | $$ |$$ |/$$$$$$ |/$$$$$$$/
$$ | $$ |$$ | $$ | $$ | __ $$$$/ $$ |$$ |$$ $$ |$$ \
$$ |__$$ |$$ \__$$ | $$ |/ |$$ | $$ |$$ |$$$$$$$$/ $$$$$$ |
$$ $$/ $$ $$/ $$ $$/ $$ | $$ |$$ |$$ |/ $$/
$$$$$$$/ $$$$$$/ $$$$/ $$/ $$/ $$/ $$$$$$$/ $$$$$$$/
My dotfiles priorities simplicity of installation and ease of deployment on both Linux and MacOS. To achieve this they use GNU stow for manage configuration and GNU make for setup.
- lowercase directories contain dotfiles, these folders are being stowed
- leading
@
directories contains setup for specified environments, eg.@macos
My dotfiles require git
and make
libraries for installation. Make sure you have both on your machine before starting.
- Arch:
sudo pacman -S git make
- OSX:
brew install git make
The installation process is organized around Makefile
files.
- General
Makefile
file in the root of the repository. Installs common configurations for UNIX based OS. - Environment
Makefile
files placed in@
prefixed directories. Setups an OS-specific configuration.
Let's go through an example process of configuring a new MacOS computer.
- First, clone this repository to your
$HOME
folder:
git clone [email protected]:jedrzejchalubek/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
git submodule init
git submodule update
- Go to the previously cloned directory and run main
Makefile
:
# Move to the previously cloned repository ...
$ cd ~/.dotfiles
# ... and run `make` at ~/.dotfiles
$ make
- Now, change to environment specific directory and run its
Makefile
:
# Go to environment specific directory ...
$ cd ~/.dotfiles/@macos
# ... and run `make` at ~/.dotfiles
$ make
As dotfiles are just a git repository we only have to push or pull latest changes and re-run makefiles to update symlinks and apply eventual changes. However, it's better to unlink current dotfiles before updating.
- Unlink general and environment symlinks.
# Go to dotfiles directory ...
$ cd ~/.dotfiles
# ... and run `make unlink`
$ make unlink
# .. then move to environment directory ...
$ cd ~/.dotfiles/@macos
# ... and also run `make unlink`
$ make unlink
- Fetch latest changes of dotfiles from the remote repository
# Go to dotfiles directory ...
$ cd ~/.dotfiles
# ... and update repository
$ git pull
- Re-run installation steps.
Many parts was inspired by dotfiles shared by other folks, but credits especially go to: