docs, test: add config management documentation and tests
Test PR / test (pull_request) Successful in 6s
Release on Merge / release (pull_request) Successful in 6s

This commit is contained in:
2026-05-02 23:33:23 -04:00
parent 1129563000
commit 616aa6f2f1
2 changed files with 37 additions and 0 deletions
+19
View File
@@ -52,6 +52,9 @@ Options:
--[no-]copy Copy result to clipboard
--[no-]notify Show desktop notification
--desktop GUI mode: pick → copy → notify
--get-config Print the current configuration
--set-config Update the configuration (e.g. --set-config desktop --copy)
--reset-config Restore the configuration file to its default values
--install Install to ~/.local/share/ and symlink to ~/.local/bin/
--help, -h Show this help message
```
@@ -102,6 +105,22 @@ copy = true # copy result to clipboard
notify = true # show desktop notification with the copied value
```
You can also use the CLI to manage your configuration:
```bash
# View current config
color-tool --get-config
# Update specific keys (e.g., enable swatch by default)
color-tool --set-config defaults --swatch
# Set output format for desktop mode
color-tool --set-config desktop output=rgba
# Reset to factory defaults
color-tool --reset-config
```
## 🧪 Testing
The project includes a comprehensive test suite that verifies color conversion, configuration loading, and system integrations (clipboard/notifications) using mocks.