|
| 1 | +# DailyDriver |
| 2 | + |
| 3 | +Visual keyboard shortcut configuration tool for GNOME/Wayland with presets, cheat sheet overlay, and conflict detection. |
| 4 | + |
| 5 | +## Quick Reference |
| 6 | + |
| 7 | +```bash |
| 8 | +# Dev environment |
| 9 | +cd /home/gregf/development/dailydriver-standalone |
| 10 | +source venv/bin/activate |
| 11 | +PYTHONPATH=src pytest tests/unit/ -v |
| 12 | + |
| 13 | +# Lint |
| 14 | +ruff check src/ tests/ |
| 15 | +ruff format src/ tests/ |
| 16 | + |
| 17 | +# Build Flatpak locally |
| 18 | +flatpak-builder --force-clean --user --install build-dir io.github.gregfelice.DailyDriver.yml |
| 19 | + |
| 20 | +# Run dev mode |
| 21 | +./run-dev.sh |
| 22 | +``` |
| 23 | + |
| 24 | +## Architecture |
| 25 | + |
| 26 | +GTK4/Libadwaita app using Python with Meson build system. Packaged as Flatpak. |
| 27 | + |
| 28 | +``` |
| 29 | +src/dailydriver/ |
| 30 | + application.py # App entry point, GtkApplication subclass |
| 31 | + window.py # Main window (42k - largest file, handles all views) |
| 32 | + models/ |
| 33 | + shortcut.py # Shortcut data model |
| 34 | + keyboard.py # Keyboard layout model |
| 35 | + profile.py # Profile/preset model |
| 36 | + services/ |
| 37 | + gsettings_service.py # Reads/writes GNOME keyboard shortcuts via dconf |
| 38 | + keyboard_config_service.py # Orchestrates shortcut configuration |
| 39 | + profile_service.py # Loads/saves preset profiles (TOML) |
| 40 | + hardware_service.py # Keyboard hardware detection |
| 41 | + hid_apple_service.py # Mac keyboard hid-apple module config |
| 42 | + backends/ # Desktop-specific backends (GNOME, future KDE/Hyprland) |
| 43 | + views/ |
| 44 | + keyboard_view.py # Visual keyboard display |
| 45 | + cheatsheet.py # Cheat sheet overlay (Alt+Super+/) |
| 46 | + preset_selector.py # Preset selection UI |
| 47 | + shortcut_editor.py # Individual shortcut editing |
| 48 | + shortcut_list.py # Shortcuts list by category |
| 49 | +``` |
| 50 | + |
| 51 | +Key patterns: |
| 52 | +- GTK requires `gi.require_version()` before imports; ruff E402 is suppressed for these files |
| 53 | +- Services are injected into views, not imported directly |
| 54 | +- Presets are TOML files defining complete shortcut sets ("clean slate" approach) |
| 55 | +- GNOME does NOT support xdg-desktop-portal GlobalShortcuts; app falls back to gnome-settings-daemon keybindings |
| 56 | + |
| 57 | +## Conventions |
| 58 | + |
| 59 | +- **Python**: 3.11+, ruff for linting/formatting, line length 100 |
| 60 | +- **Testing**: pytest with pytest-cov, pytest-mock; tests in `tests/unit/`; 220+ tests |
| 61 | +- **Packaging**: Use `uv pip` for installs, Meson build system, Flatpak for distribution |
| 62 | +- **Git**: Conventional commit messages |
| 63 | +- **Branching**: main branch, push to GitHub |
| 64 | +- **App ID**: `io.github.gregfelice.DailyDriver` (reverse DNS for Flatpak/Flathub) |
| 65 | + |
| 66 | +## Key Documentation |
| 67 | + |
| 68 | +- `docs/BACKLOG.md` - Prioritized backlog (P0-P3) |
| 69 | +- `docs/STATUS.md` - Project status and last session notes |
| 70 | +- `docs/RELEASING.md` - Version numbering and release process |
| 71 | +- `docs/FLATPAK_SUBMISSION_GUIDE.md` - Flathub submission reference |
| 72 | +- `docs/adr/` - Architecture decision records |
| 73 | +- `docs/research/` - Research notes |
| 74 | +- `flathub/FLATHUB_PR.md` - Flathub PR description and permission justifications |
| 75 | + |
| 76 | +## Status |
| 77 | + |
| 78 | +**v0.1.0-alpha** - Application is solid and running well on GNOME/Wayland. |
| 79 | + |
| 80 | +- 220 tests passing, 6 failing (mock setup issues in custom keybinding tests) |
| 81 | +- 29% code coverage (core services well tested; UI views untested) |
| 82 | +- CI/CD operational via GitHub Actions |
| 83 | +- Flathub submission pending review |
| 84 | +- AUR package published |
| 85 | +- Known platform limitation: GNOME does not implement xdg-desktop-portal GlobalShortcuts |
| 86 | + |
| 87 | +See `docs/BACKLOG.md` for current priorities. |
0 commit comments