Commit Graph

41 Commits

Author SHA1 Message Date
rootiest 06dd84d3a3 refactor: apply tilde_path to all user-facing path output
Test PR / test (pull_request) Successful in 7s
Auto Label PRs / label (pull_request) Successful in 3s
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.
2026-05-08 23:43:58 -04:00
rootiest 075bb10265 feat: XDG Base Directory compliance, --uninstall flag, and xclip advisory
- 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
2026-05-08 23:43:58 -04:00
rootiest 979c0b7436 docs: link script directly in manual install guide
Link directly to the script rather than to the release for the "Manual
Usage" instructions in the Installation section.
2026-05-04 22:07:09 -04:00
rootiest e5bbc5ae19 Merge pull request 'feat: dependency check system and global refactor' (#12) from feat/dependency-check-and-refactor into main
Reviewed-on: #12
v2026.05.05-0146
2026-05-05 01:46:26 +00:00
rootiest def2127ed6 feat: add dependency check and refactor global state
Auto Label PRs / label (pull_request) Successful in 2s
Test PR / test (pull_request) Successful in 7s
Release on Merge / release (pull_request) Successful in 5s
- 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.
2026-05-04 21:44:01 -04:00
rootiest 2b58cc8a13 Merge pull request 'feat(config): enable desktop swatch and improve comment alignment' (#11) from feat/desktop-swatch-and-config-alignment into main
Reviewed-on: #11
v2026.05.03-1858
2026-05-03 18:58:02 +00:00
rootiest e0967a8388 feat(config): maintain comment alignment in set_config
Auto Label PRs / label (pull_request) Successful in 3s
Test PR / test (pull_request) Successful in 6s
Release on Merge / release (pull_request) Successful in 6s
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.
2026-05-03 14:57:02 -04:00
rootiest 8d94bc4006 feat(config): enable swatch by default for desktop mode
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.
2026-05-03 14:56:31 -04:00
rootiest 10014d5ee9 Merge pull request 'fix(help): clarify --swatch applies to terminal output and desktop notifications' (#10) from fix/swatch-help-text into main
Reviewed-on: #10
2026-05-03 18:30:19 +00:00
rootiest 8333d249d9 fix(help): clarify --swatch applies to terminal and notifications
Auto Label PRs / label (pull_request) Successful in 3s
Test PR / test (pull_request) Successful in 6s
Release on Merge / release (pull_request) Successful in 6s
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.
2026-05-03 14:29:30 -04:00
rootiest 383d547a32 Merge pull request 'docs: update curl download instructions from latest release' (#9) from docs/update-download-url into main
Reviewed-on: #9
2026-05-03 18:22:54 +00:00
rootiest 1d92dc911e docs: add curl download instructions from latest release
Auto Label PRs / label (pull_request) Successful in 3s
Test PR / test (pull_request) Successful in 6s
Release on Merge / release (pull_request) Has been skipped
2026-05-03 14:20:29 -04:00
rootiest 24747230e1 Merge pull request 'feat: implement notification color swatch and dependency verification' (#8) from feat/notify-swatch into main
Reviewed-on: #8
2026-05-03 18:09:54 +00:00
rootiest 867b8ccf26 docs: update README with swatch and dependency checks
Test PR / test (pull_request) Successful in 7s
Release on Merge / release (pull_request) Successful in 6s
2026-05-03 14:08:53 -04:00
rootiest 7c882bb26c feat: implement notification color swatch and dependency verification
Auto Label PRs / label (pull_request) Successful in 3s
Test PR / test (pull_request) Successful in 6s
2026-05-03 14:05:11 -04:00
rootiest f2be6c151e Merge pull request 'ci: add workflow to automatically label PRs based on title' (#7) from ci/auto-label-prs into main 2026-05-03 03:38:42 +00:00
rootiest b78becad5f ci: add workflow to automatically label PRs based on title
Auto Label PRs / label (pull_request) Successful in 3s
Test PR / test (pull_request) Successful in 5s
Release on Merge / release (pull_request) Has been skipped
2026-05-02 23:38:21 -04:00
rootiest 48b436b20a Merge pull request 'feat: implement config management flags and documentation' (#6) from feat/manage-config into main v2026.05.03-0333 2026-05-03 03:33:43 +00:00
rootiest 616aa6f2f1 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
2026-05-02 23:33:23 -04:00
rootiest 1129563000 Merge pull request 'ci/test: add gitea workflow and comprehensive test coverage' (#5) from ci/test-workflow into main 2026-05-03 03:30:59 +00:00
rootiest 9ab65a6b1f ci/test: add gitea workflow and comprehensive test coverage
Test PR / test (pull_request) Successful in 6s
Release on Merge / release (pull_request) Successful in 5s
2026-05-02 23:30:43 -04:00
rootiest 67596389ec Merge pull request 'feat: implement config management flags' (#4) from feat/manage-config into main
Reviewed-on: #4
2026-05-02 03:13:52 +00:00
rootiest 456071f2da feat: implement config management flags
Release on Merge / release (pull_request) Successful in 1m9s
- 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.
2026-05-01 23:13:06 -04:00
rootiest 100fecda18 Merge pull request 'ci/test: add test suite and release label exclusions' (#3) from ci/tests into main
Reviewed-on: #3
2026-04-29 02:44:37 +00:00
rootiest 078118f689 Merge branch 'ci/label-exclusions' into ci/tests
Release on Merge / release (pull_request) Has been skipped
2026-04-28 22:41:39 -04:00
rootiest 0d7b93cab7 ci: skip releases for testing or documentation PRs
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.
2026-04-28 22:39:59 -04:00
rootiest 37a5497336 test: add comprehensive bash test suite
- 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
2026-04-28 22:31:57 -04:00
rootiest 344fc140dc Merge pull request 'fix: notify when clipboard utility is missing' (#2) from fix/copy-fail into main
Reviewed-on: #2
v2026.04.29-0218
2026-04-29 02:18:26 +00:00
rootiest 5f659b90e3 fix: notify when clipboard utility is missing
Release on Merge / release (pull_request) Successful in 6s
- 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
2026-04-28 22:17:31 -04:00
rootiest d170bd15cf refactor: remove references to legacy setting
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.
2026-04-27 23:58:14 -04:00
rootiest 8a70c79602 Modernization Major Release
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
v2026.04.28-0323
2026-04-28 03:23:00 +00:00
rootiest 898d44dd17 docs: add credit for wl-colorpicker-plasma script to readme
Release on Merge / release (pull_request) Successful in 11s
2026-04-27 23:16:23 -04:00
rootiest ce410d1450 chore(license): add license file and headers to source files 2026-04-27 23:15:17 -04:00
rootiest 6a88e396c5 chore: update ignore patterns
Include AI Agent documents.
2026-04-27 22:55:01 -04:00
rootiest 7da7664ca0 ci: add Gitea workflow to automate releases on PR merge 2026-04-27 22:48:13 -04:00
rootiest 24bc490827 docs: add comprehensive README with installation and usage guides 2026-04-27 22:44:39 -04:00
rootiest 5c87e382de feat: modernize color-tool with multiple formats, HSL support, and embedded picker
- 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
2026-04-27 22:40:55 -04:00
rootiest 6c2c42d3e5 feat: add modernized functionality
- Installation
- Desktop/GUI mode
- Configuration file
- Improved code and documentation formats
2026-04-27 21:36:39 -04:00
rootiest 06ac7c990d chore: remove original script file 2026-04-27 21:35:28 -04:00
rootiest f995f1c52e chore: update ignore patterns 2026-04-27 21:34:34 -04:00
rootiest 110b71d9f0 initial commit 2026-04-27 19:48:53 -04:00