Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
HanabishiRecca committed Oct 2, 2023
1 parent 1dda700 commit e729944
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
## Caches manager

A simple script that helps keep selected directories clean by symlinking or binding to tmpfs ramdisk.
A simple script that helps keep selected directories clean by symlinking or mounting to tmpfs ramdisk.
Useful for temporary, cache and other junk directories.

### Usage

1. Enable both system and user services.
1. Enable system and/or user services.

```
# systemctl enable caches-manager.service
# systemctl --global enable caches-manager.service
```
# systemctl enable caches-manager.service
$ systemctl --user enable caches-manager.service

2. Make your configs.

Expand All @@ -20,19 +18,19 @@ The script reads all `.conf` files from respective directories:
- `$XDG_CONFIG_HOME/caches-manager` (`~/.config/caches-manager`) - per-user configs.

Configs are read as one path per line. Default mode of operation is to symlink the directory.
If you want to use bind mount instead, prefix the path with `b:`. Bind mounts are more failsafe and keep actual directories if the service disabled/uninstalled, so they are preferred for system directories.
If you want to use mount instead, prefix the path with `b:`. Mounts require root privileges but more failsafe and keep actual directories if the service was disabled/uninstalled, so they are preferred for system directories.
System-wide configs require full absolute paths (e.g. `b:/var/cache`).
User configs treat paths relative to user home directory (e.g. `.cache` will be resolved to `~/.cache`).

**WARNING!** All content in the target directories will be purged!
Ensure that the target directories do not contain any valuable data. Tmpfs keeps data in RAM and drops it on every shutdown or reboot.
**WARNING!** Tmpfs keeps data in RAM and drops it on every shutdown or reboot.
The app will backup existing non-empty directories just in case.

3. Changes will be applied on the next boot (or user log-in in case of user service). You can force changes by executing the services or running the script manually, but this is not recommended.

### Packages

**Arch Linux**
- [caches-manager](https://aur.archlinux.org/packages/caches-manager) <sup>AUR</sup>
- [`caches-manager`](https://aur.archlinux.org/packages/caches-manager) <sup>AUR</sup>

### Manual installation

Expand Down

0 comments on commit e729944

Please sign in to comment.