Provides the location of these directories by leveraging the mechanisms defined by - the XDG base directory specifications on Linux and macOS - the Known Folder API on Windows
```sh cargo install rrcm
rrcm init ```
The configuration file is a yaml file. configuration file path: - Unix: $HOME/.config/rrcm/config.yaml - Win: %PROFILE%\AppData\Roaming\rrcm\config.yaml
The repository is defined in the config.yaml file. ```yaml repos:
example1: 'git@github:example/example1'
example2: 'git@github:example/example2'
the repository is a directory that contains the dotfiles.
Directory structure example:
rust
dotfiles
├── home
│ ├── .profile -> $HOME/.profile(Unix)
│ │ %PROFILE%.profile(Win)
│ └── ...
├── config
│ ├── nushell -> $HOME/.config/nushell(Unix),
│ │ %PROFILE%\AppData\Roaming\nushell(Win)
│ └── ...
└── configlocal
├── nvim -> $HOME/.config/nvim(Unix),
│ %PROFILE%\AppData\Local\nvim(Win)
└── ...
```
home, config, configlocal are the deployment targets.
- home: Deploy to $HOME(Unix), %PROFILE%(Win)
- config: Deploy to $HOME/.config(Unix), %PROFILE%\AppData\Roaming(Win)
- config_local: Deploy to $HOME/.config/local(Unix), %PROFILE%\AppData\Local(Win)
Under the deployment target, the file or directory is deployed by symbolic link. Windows needs to be run as administrator.
The deployment target is defined in the config.yaml file.
yaml
deploy:
home:
windows: "%USERPROFILE%"
mac: "${HOME}"
linux: "${HOME}"
config:
windows: "%FOLDERID_RoamingAppData%"
mac: "${XDG_CONFIG_HOME}"
linux: "${XDG_CONFIG_HOME}"
config_local:
windows: "%FOLDERID_LocalAppData%"
mac: "${XDG_CONFIG_HOME}"
linux: "${XDG_CONFIG_HOME}"
Environment variables can be used in the deployment target. Format - Unix: ${ENVIRONMENTVARIABLENAME} - Windows: %ENVIRONMENTVARIABLENAME%
The following special variables are available. - Unix XDG base directory if the environment variable is not set, the default value is used. - ${XDGCONFIGHOME} - ${XDGDATAHOME} - ${XDGCACHEHOME} - ${XDGRUNTIMEDIR} - Windows Known Folder ID - %FOLDERIDRoamingAppData% - %FOLDERIDLocalAppData% - %FOLDERIDDocuments% - %FOLDERIDDesktop%
```sh
rrcm update
rrcm status ```