Configuration

tori looks for configuration in ~/.config/tori.

In this directory, you can create the following files and directories:

  • tori.conf: configures options that will determine how tori itself behaves
  • packages: a list of packages containing one package name per line
  • base: a directory containing any number of files that tori will copy to specific locations

Configuration options

The tori.conf file must use the following format:

tori_root = ~/.local/apps/my-tori-installation

For a complete reference on this file, including its syntax and all available options, see the tori.conf documentation page.

Package lists

tori will read the packages file and check if it matches the list of currently installed packages. If it does not match, it by default will ask you how to proceed.

The application only concerns itself with manually installed packages. Any dependencies pulled automatically should not be picked up by tori unless you have manually installed that dependency or marked it as such.

This is ensured by specifically querying your package manager for a list of manually installed packages, so tori should actually not even be aware of which automatically-installed packages you have on your system.

In your packages file, empty lines and lines beginning with a # are ignored.

Base files

tori will go through the contents of the ~/.config/tori/base directory and take different actions depending on how they are laid out.

Tree strategy

The default way tori compares files is called the tree strategy. It expects you to have top-level directories inside base that match the directories starting from your system’s root (for example, a base/home directory).

tori will recursively inspect this directory for files and compare them to the contents of the matching directories in the system.

For example, if you have the following configuration:

~/.config/tori
└── base
    └── home
        └── alice
            └── .shrc

Upon running tori check, tori will compare your configuration’s .shrc file at ~/.config/tori/base/home/alice/.shrc to /home/alice/.shrc.

If any of the files in your configuration do not exist on the corresponding location, tori will copy them to it. If they do exist and match, it won’t do anything. And if they differ from their counterparts, by default tori will ask you how to proceed.

Differs: ~/.shrc
 [1] Overwrite system
 [2] Overwrite configuration
 [3] Show difference
 [0] Exit
Choose an option number:

In the example above, ~/.config/tori/base/home/alice/.shrc and /home/alice/.shrc have differed, so the user is presented with choices on how to conciliate them.

tori will create backups every time a file is modified or overwritten.