Thank you for your interest in contributing! This guide will help you get started.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/<your-username>/hypr-switcher.git
cd hypr-switcher- Install dependencies (Arch Linux example):
sudo pacman -S wayland wayland-protocols libxkbcommon- Build the project:
cargo build- Run the tests to make sure everything works:
cargo test- Create a branch from
develop:
git checkout develop
git checkout -b feature/your-feature-name-
Write tests first. This project follows TDD (Test-Driven Development). Add or update tests before writing implementation code.
-
Implement your changes. Keep them focused and minimal.
-
Run the full test suite to make sure nothing is broken:
cargo test- Build in release mode to catch any optimized-build issues:
cargo build --releaseThis project uses Conventional Commits with emoji prefixes:
| Type | Emoji | Example |
|---|---|---|
| feat | ✨ | ✨ feat(ui): add grid layout |
| fix | 🐛 | 🐛 fix(ipc): handle socket timeout |
| docs | 📝 | 📝 docs(readme): update installation guide |
| test | ✅ | ✅ test(app): add navigation tests |
| refactor | ♻️ | ♻️ refactor(icons): simplify fallback chain |
| perf | ⚡ | ⚡ perf(ipc): reduce socket read latency |
| chore | 🔧 | 🔧 chore: update dependencies |
Rules:
- Write commit messages in English, imperative mood ("add", not "added")
- Keep the first line under 72 characters
- One logical change per commit
- Push your branch to your fork:
git push origin feature/your-feature-name-
Open a Pull Request against the
developbranch (notmain) -
In the PR description, include:
- What the change does and why
- How to test it
- Screenshots if it changes the UI
-
Wait for review. Address any feedback with new commits (don't force-push).
src/
├── main.rs # Entry point, PID management, IPC listener
├── app.rs # Application state, update loop, keyboard handling
├── hyprland/
│ ├── ipc.rs # Hyprland Unix socket IPC
│ └── types.rs # Data types (HyprClient, WindowEntry)
├── icons/
│ └── resolver.rs # XDG icon resolution with theme support
└── ui/
├── style.rs # Design tokens (colors, dimensions)
└── window_list.rs # Window card grid rendering
Run all tests:
cargo testRun tests for a specific module:
cargo test app::
cargo test hyprland::
cargo test icons::
cargo test ui::Run with debug logging:
RUST_LOG=debug cargo runBe respectful and constructive. We are all here to build something useful together.