mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-15 09:01:15 +00:00
- Implement screen_size via xcap Monitor, mouse_position via x11rb query_pointer, standalone screenshot with optional annotation, launch for spawning detached processes - Handler dispatchers for get-screen-size, get-mouse-position, screenshot, launch - SKILL.md agent discovery file with allowed-tools frontmatter - AGENTS.md contributor guidelines for AI agents - README.md with installation, quick start, architecture overview
1 KiB
1 KiB
Agent Guidelines
Build
cargo build
cargo clippy
Run
Requires an X11 session with DISPLAY set.
cargo run -- snapshot
cargo run -- --json snapshot --annotate
Code Style
- No emojis in code or comments
- Use
anyhow::Resultfor all fallible functions - All daemon handler functions are async
- Match field naming between CLI args, NDJSON protocol, and JSON output
Architecture
src/cli/- clap CLI parser and client-side socket connectionsrc/daemon/- tokio async daemon, request handler, state managementsrc/backend/- DesktopBackend trait and X11 implementationsrc/core/- shared types, protocol, ref map, session detection
Adding a New Command
- Add the variant to
Commandenum insrc/cli/mod.rs - Add request building in
build_request()insrc/cli/mod.rs - Add the action handler in
src/daemon/handler.rs - Add the backend method to
DesktopBackendtrait insrc/backend/mod.rs - Implement in
src/backend/x11.rs - Update
SKILL.md