See permissions AT https://github.com/marcospb19/permissions !!
THIS README IS JUST A SCRATCH, TOOL IS NOT FINISHED.
DOTÃO
dotao
is a modern dotfiles manager that keeps you in control.
A dotfiles manager is a tool that helps organizing your dotfiles (configuration files), making it easy to backup, share, remove and reapply the settings.
ABOUT
It is designed to work nicely with git
, because you can:
- Monitor and revert file changes.
- Change history is compressed.
- Upload backups.
- Share dotfiles with friends.
However, using it with git
is optional.
dotao
uses a dotao.tsml
:
- It keeps track of your dotfiles folder.
- Allows for some specific file and folder configuration.
- Allows for system-specific conditional layouts.
- Is human readable and editable.
This file is updated automatically by commands, you don't have to edit manually, but you can.
dotao
uses symlinks to:
- Link imported files to their original location.
- You can still use them as if they were there.
INSTALLATION
Installing the binary
Run this script.
curl -s https://raw.githubusercontent.com/marcospb19/dotao/master/install.sh | sh
Compiling from source
USAGE
There are three main steps for using dotao
:
- Creating a new
~/dotfiles/
folder.- Containing a
dotao.tsml
file.
- Containing a
- Importing your files into
~/dotfiles/
.- Moving files and updating
dotao.tsml
accordingly.
- Moving files and updating
- Linking imported files.
- Creating symlinks to their original location.
Commands used in this tutorial for each step:
dotao init
dotao import
dotao link
The second and third steps are repeatable.
Creating
In your user's home directory, create dotfiles/
and enter it.
mkdir dotfiles
cd dotfiles
Now ask dotao
to create a dotao.tsml
configuration file.
dotao init
Importing
Here's an example with zsh
configuration files, to show how to easily import files to your folder.
zsh
files usually stay in the home directory:
~/.zshrc
~/.aliases
~/.functions
~/.profile
In this step, we will use the import
command to:
- Create a
zsh
folder. - Move each file.
- Update
dotao.tsml
with files info.
The folder will look like:
Files moved:
~/.aliases -> ~/dotfiles/zsh/.aliases
~/.functions -> ~/dotfiles/zsh/.functions
~/.profile -> ~/dotfiles/zsh/.profile
~/.zshrc -> ~/dotfiles/zsh/.zshrc
The command used:
dotao import zsh ~/.aliases ~/.functions ~/.profile ~/.zshrc
Linking
dotao.tsml
holds all the information needed to create the links.
So let's link it!
dotao link
Now your files are accessible by your applications at the same place just like before.
(Hint: before linking, run dotao status
to see a linkage report.)
Applying to other systems
Now that your files are inside of one folder, let's assume that you have uploaded to github
.
Now in another system, clone your dotfiles and enter the folder:
git clone https://github.com/marcospb19/dotfiles # Use your URL
cd dotfiles
Inside of the folder, run dotao status
to see if there are any conflicts:
dotao status
Once you have solved every conflict:
dotao link
Done, all your configs applied in another system.
COMMANDS
dotao
usage is all based on commands (similar to how the git
CLI works).
dotao COMMAND ...
Commands may accept specific subcommands, arguments and flags.
dotao init
Creates a dotao.tsml
file, initiating dotfiles folder.
dotao update
TODO INFO
dotao import
Creates the necessary folders inside of ~/dotfiles/
, moves the files, and updates dotao.tsml
.
So dotao import
is just a convenient command that merges functionality from 3 other commands:
mkdir
mv
dotao update
dotao status
Reads dotao.tsml
, scans your dotfiles folder, and displays a report of:
- Is there something left to link?
- Is any file missing?
- Is there a file already in the target path?
- Is it a file or folder?
- If it is already a link, but points to the wrong place
- Are multiple files pointing to a same conflicting location?
Much like git status
does, it can be used at any moment.
WIKI
Check our wiki.