Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.72 KB

README.md

File metadata and controls

53 lines (39 loc) · 1.72 KB

vacuum

Build

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.

How it works?

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
    • Change directory to config/options
      • Copy file with the name editor.xml

You can have a look at the currently available .vacuum files here.

An example repository with collected configs is at here

How to run?

  • Clone the repository
  • Run cargo run -- store ./myconfigs to vacuum configurations into ./myconfigs
  • Run cargo run -- restore ./myconfig to restore your configurations from ./myconfig

asciicast