configctl/README.md

34 lines
1.4 KiB
Markdown

# configctl
a simple wrapper around fuse-overlayfs to manage multiple config changesets
# Why?
i have an unhealthy relationship with overlayfs. i also like to easily change my desktop themes without a bunch of symlink swapping
# Requirements
* fuse-overlayfs
* systemd
# Usage
```sh
configctl [OPTIONS] <changeset> [unmount]
```
by default, the configctl expects the base configuration set to exist in `$XDG_DATA_HOME/config/base` (usually `~/.local/share/config/base`) and the changesets to exist in `$XDG_DATA_HOME/config/changeset`. changes while the configuration is mounted will be written to `$XDG_STATE_HOME/config/{<changeset>,.work_<changeset>}`
```sh
configctl my_config
```
executing the previous command will do the following
* search for `$XDG_DATA_HOME/config/changeset/my_config`
* create the following directories if they don't already
* `$XDG_STATE_HOME/config/my_config`
* `$XDG_STATE_HOME/config/.work_my_config`
* create a service file in `$XDG_CONFIG_HOME/systemd/user/my_config-automount.service`
* mount the base config and the selected changeset
enabling the service file will mount the config on next user login
# Notes
when unmounting or changing a configuration changeset, the target mountpoint will be *lazily* unmounted. there is no guarantee when the volume will be successfully unmount. that said, it should be safe enough to remount a new configuration immediately after.