Unix dotfiles
The dotfiles configuration tool works for macOS and Linux. It should work with any reasonable POSIX OS or devcontainer.
The dotfiles are managed using symlinks. The source file is under the config
directory in the location where it should appear in $HOME
.
The dotfiles
command can be used to manage the configuration. The following are the available commands:
Usage dotfiles [options] <subcommand>
Subcommands:
init Initialize dotfiles
status Show configuration status
sync Sync configuration
uninstall Uninstall configuration
update Update configuration
Options:
-d Dotfiles directory
-t Target directory
-v Verbose
Initialize dotfiles. This command will ensure prerequisites are installed and link the configuration files. The command should be run after the dotfiles are cloned.
dotfiles init
Show the status of the configuration files. This command will list the files that are linked, missing, or in conflict.
dotfiles status
Sync the configuration files. This command will adopt any changes and link the files from the dotfiles directory to the target directory.
dotfiles sync
Uninstall the configuration files. This command will remove the symlinks created by the dotfiles tool.
dotfiles uninstall
Update the configuration files. This command will pull the latest changes from the dotfiles repository and link the files.
dotfiles update
Path | Description |
---|---|
bin | Dotfiles tools |
config | Configuration source files |
packages | Install scripts for packages |
themes | Useful themes |
The following are the minimum requirements for dotfiles to work:
On macOS, Xcode is expected to be installed and configured.
sh -c "$(curl -sSL https://raw.githubusercontent.com/ascarter/dotfiles/main/install.sh)"
If directly executing script is not desired, clone into a location (recommend ~/.config/dotfiles
)
git clone [email protected]:ascarter/dotfiles.git ~/.config/dotfiles
cd ~/.config/dotfiles
./install.sh
sh -c "$(curl -sSL https://raw.githubusercontent.com/ascarter/dotfiles/main/install.sh)" -s -- -b <branch>
Run the uninstall script to remove the symlinks and restore any original files:
cd ~/.config/dotfiles
./uninstall.sh