Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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.

If you would prefer not to be asked every time, you can configure a default action to be taken for package conflict resolution by setting the package_resolution option in your tori.conf file. See the tori.conf page for details.

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.

If you do not want to be asked every time, you can configure tori to take a specific action without asking.

If you decide to do so, bear in mind important files may get overwritten without warning. tori will create backups every time a file is modified or overwritten.

Spare strategy

If you would rather not replicate the system directory hierarchy in your basedirectory (for instance, if you don’t like having to navigate complicated directory structures), you can also place spare files in the base directory in any other structure you desire.

In this case, you will have to create a files file on the root of your configuration directory to manually specify what are the files you want them to be matched against.

To accomplish the same as the previous example with the spare strategy, you could have the following file structure:

~/.config/tori
├── base
│   └── .shrc
└── files

In the files file, you then would specify what system file the .shrc file in base should match using a <base file> <system file> format.

.shrc ~/.shrc

If either of these paths contain spaces, make sure to double quote them.