Vacuum is a system-wide configuration file collector.
This repo contains highly experimental code before settling on a final design and far from being complete. Any feedback is welcome.
Vacuum processes .vacuum files.
A vacuum file, in essence, is a mini DSL that describes where to look at to find application specific configuration files.
Vacuum files are written per application. An example vacuum file for WebStorm is as follows:
app "WebStorm" {
home {
search ".WebStorm*" {
cd "config" {
cd "keymaps" {
files "*.xml"
}
cd "options" {
file "editor.xml"
}
}
}
}
}
By processing this file, vacuum will:
- Create a WebStorm folder to store found configuration files
- Change to the home folder
- Search for directories matching the pattern
.WebStorm
and for each found directory:- Change directory to config/keymaps
- Copy all files matching the pattern
*.xml
- Copy all files matching the pattern
- Change directory to config/options
- Copy file with the name
editor.xml
- Copy file with the name
- Change directory to config/keymaps
You can have a look at the currently available .vacuum files here.
An example repository with collected configs is at here
- Clone the repository
- Run
cargo run -- store ./myconfigs
to vacuum configurations into./myconfigs
- Run
cargo run -- restore ./myconfig
to restore your configurations from./myconfig