Thanks for your interest in contributing to hyprshot-rs. This document explains how we work and what we expect for contributions to be accepted.
- hyprshot-rs is a Wayland screenshot tool.
- It targets Wayland compositors (Hyprland, Sway; others best‑effort).
- We prioritize small, predictable changes and low runtime overhead.
- Wayland compositor (Hyprland or Sway recommended).
- Tools:
cargo,rustfmt,clippy. - Runtime deps for testing:
wl-clipboard(externalslurpis not required).
- Fork the repo and create a feature branch.
- Make changes with clear commit messages.
- Add or update tests if behavior changes.
- Open a pull request.
- Any new user‑visible behavior must be documented (
README.md,doc/CLI.md,doc/CONFIGURATION.md). - Any bug fix must link to an Issue (or create one first).
- Every PR must reference the related Issue.
- New functionality should be discussed in an Issue before implementation.
Before starting work:
- Open an Issue for new features.
- Open an Issue for bugs with reproduction steps and environment.
- Link the Issue in your PR description.
- Keep tests deterministic.
- Avoid environment‑specific assumptions.
- Run
cargo testlocally before opening a PR. - For manual Wayland verification, use
scripts/wayland_tests.shwith the built binary.
- Update
README.mdfor user‑facing changes. - Update
CHANGELOG.mdfor notable changes. Example:### Fixed - **Short summary**: Clear description of what changed and why.
- Follow the existing style and structure.
- Avoid new
unsafeunless absolutely necessary (explain why). - Prefer explicit error handling over
unwrap()/expect()in production code. - Keep functions focused and readable.
- Linked Issue in PR description
- Tests added/updated (if needed)
-
cargo testpasses locally - Docs and changelog updated (if needed)
- Keep PRs focused and small when possible.
- Be explicit about tradeoffs and alternatives.
- If unsure, open an Issue and ask first.