# Contributing to x11-overlay
Thank you for your interest in contributing to x11-overlay! This document outlines the process for contributing to this X11 overlay system.
## Development Setup
### Prerequisites
- Rust 1.70 or later
- X11 development libraries
- Git
### Getting Started
```bash
git clone https://github.com/cinnes/x11-overlay.git
cd x11-overlay
# Set up git hooks
git config core.hooksPath .githooks
# Build and test
cargo build
cargo clippy
cargo fmt
```
## Code Standards
### Quality Checks
All contributions must pass:
- `cargo fmt` - Code formatting
- `cargo clippy -- -D warnings -A dead_code` - Linting
- `cargo check --release` - Build verification
These are enforced by pre-commit hooks.
### Code Style
- Follow Rust naming conventions
- Use comprehensive error handling with `anyhow`
- Add descriptive error contexts
- Document public APIs
### Architecture
- Maintain separation between graphics, UI, and X11 layers
- Use the Component trait for UI elements
- Keep X11-specific code in the overlay module
## Contributing Process
### 1. Issues
- Check existing issues before creating new ones
- Use issue templates when available
- Provide clear reproduction steps for bugs
### 2. Pull Requests
- Fork the repository
- Create a feature branch from `master`
- Make your changes
- Ensure all quality checks pass
- Submit a pull request
### 3. Review Process
- All PRs require review before merging
- Address review feedback promptly
- Keep PRs focused and reasonably sized
## Testing
Currently, x11-overlay is in early development and lacks automated tests. Manual testing should verify:
- Overlay appears correctly
- Transparency works with compositor
- Click-through functionality operates as expected
- No crashes or X11 errors
## Documentation
- Update README.md for user-facing changes
- Add inline documentation for new APIs
- Include examples for new features
## License
By contributing, you agree that your contributions will be licensed under the MIT License.
## Questions?
Feel free to open an issue for questions about contributing or the project architecture.