Syncing dotfiles or other folders with symlinks can be a bit annoying to manage. Especially when you have multiple systems to setup.
You can create system dependent links to alleviate all your stress
- Easy initalisation of configurations
dots init
- Addition of links
dots add file1 file2
dots add file1 --destination files/file2linked
dots add file1 file2 --destination files
- Manage globally
dots manage
dots manage --default
- Only link on specific system
dots --system laptop add file1laptop
dots --system desktop add file1desktop file2desktop --destination files
- Read from environment variables
dots add $HOME/file1
- Project-wide variables
[variables] user = "auscyber" password = "1234"
- Revert link
dots revert file1
- Install rust-toolchain with if you don't already have it installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Clone the repository into a folder of your choice
git clone https://github.com/auscyberman/dotfile-sync
- Run
cargo build --release
and addtarget/build/release/dots
to yourPATH
Now It's installed. Time to configure it
- Move to folder where you want to initalise project
- Initalise Project
dots init
dots manage --default
Note:default
flag not required, just simplifies later tasks
Now you are all setup, just run dots add file1 file2 ...
and dots sync
to sync everything on another computer
Note: adding files requires --project
or --project-path
flag to command if --default
wasn't added to manage
Dotfile Sync uses TOML for configuration
- To add a link to the project, add a new section
[[links]]
with these attributes
These first three are required
name
: The user side name for the linksrc
: The relative location of the actual file in the projectdestination
: The location for thesrc
to be linked to
These are not required
system
: System to link on can be nulldefault_path
: Whensource_map
exists, the default path to link if the currentsystem
cannot be found insource_map
default_system
: The same as above, however, the default system to search for insource_map
source_map
: Map of systems to relative locations
To add the files file1
file2
dots add file1 file2
To put the file file1
in project/files/file2
dots add file1 -d files/file2
To only link file
when the system is desktop
dots add file1 --system "desktop"
To sync with no extra paremeters
curl -Ls https://git.io/JBB45 | sh -s
To add extra paremeters --system "desktop"
curl -Ls https://git.io/JBB45 | sh -s -- --system "desktop"