--uninstall prompts for config removal when stdin is a TTY. Running the
test from an interactive terminal caused it to block on read. Feeding
/dev/null forces the non-interactive path without changing behaviour.
Show only the binary(s) actually present in the clipboard row label,
and use a yellow ✔ (instead of green) when only xclip is found so the
degraded state stands out from a fully-satisfied check.
All paths printed to the user in --help, --install, and --uninstall
now display as ~/... when the path falls under $HOME, and as a full
absolute path otherwise. Actual file operations continue to use the
original absolute paths unchanged.
- Resolve all paths via $XDG_CONFIG_HOME, $XDG_DATA_HOME, and
$XDG_RUNTIME_DIR with conventional fallbacks (~/.config,
~/.local/share, /tmp); BIN_DIR stays ~/.local/bin (no XDG standard)
- Add --uninstall: removes symlink, desktop entry, and data dir with
colored per-step output; prompts to remove config when interactive,
skips silently when not; post-run verification reports any failures
- Warn in --check-deps and --install when only xclip is present —
xclip operates through XWayland and can be unreliable on Wayland
- Normalize dependency messages to package names (wl-clipboard, xclip)
- Update README: XDG paths in install steps, --uninstall in usage,
xclip advisory in prerequisites
- Fix test sandbox: export XDG_CONFIG_HOME and XDG_DATA_HOME so the
overridden HOME is respected; add install (test 15) and uninstall
(test 16) coverage; add cp and ln to mocked tool set
- Implement check_deps function and --check-deps flag for environment validation.
- Add truecolor support detection for terminal swatches.
- Colorize --install output and stylized logo.
- Refactor script to use global constants for colors and paths.
- Improve installation logic with robust directory creation.
- Update README.md and --help with new flag and detailed prerequisites.
Updated set_config to dynamically adjust leading whitespace of trailing
comments when toggling between true/false (or any values of different
lengths). This ensures that inline comments in config.toml remain
vertically aligned after programmatic updates.
Set swatch = true as the default in the stock [desktop] configuration
and internal defaults. This ensures that desktop notifications include
a visual color swatch by default. Updated README and tests accordingly.
The --swatch flag now controls both the inline terminal color block and
the desktop notification icon (via ImageMagick). Update the help text
to reflect this so users know the flag affects both output contexts.
- Add `--get-config` to print the current configuration.
- Add `--set-config` to update specific configuration keys in the TOML file.
- Add `--reset-config` to restore the default configuration.
- Refactor `do_install` to use the new `write_default_config` function.
- Update `--help` text to document the new configuration management flags.
Add a condition to the release workflow to skip execution if the PR
is labeled with 'Kind/Testing' or 'Kind/Documentation'. This prevents
unnecessary releases for non-functional changes.
- Implement tests/run_tests.sh with mocked environment
- Cover color conversion, multi-format output, and config loading
- Verify clipboard and notification integrations via mocks
- Document testing procedure in README.md
- Add notify_error function to send normal urgency warning notifications
- Update process_color to track clipboard failure and trigger error notification
- Improve warning message when clipboard utilities (wl-copy/xclip) are absent
The `--alpha` flag and `alpha = true/false` config file options remain
functional but references to them are removed as they are now superseded
by the output formats with alpha channels (rgba, hexa, hsla).
New users/configurations should use the relevant output formats. The
legacy flag/options remain active for backward-compatibility with older
configs/scripts.
This PR modernizes `color-tool` with a suite of new features, improved architecture, and automated release workflows.
### 🚀 Key Features
* **Multiple Format Support**: Now supports `hex`, `hexa`, `rgb`, `rgba`, `hsl`, and `hsla` output formats.
* **Flexible Output**: Use the new `--output` flag to specify one or more formats (e.g., `--output hex,hsl`).
* **Visual Swatches**: Added a `--swatch` flag to display a colored block in the terminal next to the values.
* **Intelligent Parsing**: Improved color input parsing that handles various CSS-style color strings.
* **Modern CLI Interface**: Added support for `--no-` flags (e.g., `--no-copy`, `--no-pick`) for fine-grained control.
* **Embedded Picker Support**: The KDE Plasma color picker logic is now more robustly managed and can be automatically generated if missing.
### 🛠 Architectural Improvements
* **Robust Configuration**: Refactored the config loader to support a clear priority hierarchy: **CLI Flags > Desktop Config > Default Config**.
* **Simplified Distribution**: Removed the hard dependency on an external `.py` file by embedding the picker helper script generation.
* **Installation Enhancements**: The `--install` process now handles `.desktop` file generation, symlinking, and sample configuration seeding more reliably.
### 📦 CI/CD & Documentation
* **Automated Releases**: Added a Gitea Action to automatically create a versioned release and upload the `color-tool` binary whenever a PR is merged into `main`.
* **Comprehensive Docs**: Added a new `README.md` with detailed installation, usage, and configuration guides.
* **Licensing**: The project is now explicitly licensed under **GPLv3** with appropriate headers and a `LICENSE` file.
### 🤝 Credits
Integration for the KDE Plasma color picker is based on the work by [SASUPERNOVA](https://github.com/SASUPERNOVA/wl-colorpicker-plasma).
Reviewed-on: #1
- Added --output flag supporting hex, rgb, hsl, rgba, hsla, hexa, and 'all' formats
- Implemented HSL/HSLA conversion using internal Python logic
- Added --[no-] prefix support for all toggleable flags (json, name, swatch, copy, notify, pick)
- Embedded KDE Plasma color picker Python script within the main bash script for portability
- Refactored argument parsing to implement a robust priority system (CLI > Desktop Config > Default Config)
- Improved validation to catch invalid output formats before triggering the color picker
- Updated installation logic to generate all necessary components and sample configuration
- Fixed swatch formatting when outputting JSON
- Refined desktop mode behavior and configurability