- Home
- Plugins
- Tools & Capabilities
- dsh-hyprland
dsh-hyprland
libregml/dsh-hyprland
Control a Hyprland desktop from DeepSeek Harness: read screen text and element ids, click by identity, drive Firefox pages over WebDriver BiDi, arrange windows and wait on state, with a guard that refuses destructive controls. Linux only.
Install
dsh plugin --profile web add github:libregml/dsh-hyprlandREADME
dsh-hyprland
A computer-use plugin for Hyprland, built for DeepSeek Harness.
Reads the screen as text and elements instead of pixels, clicks by element identity instead of coordinates, drives the page inside Firefox over WebDriver BiDi, and refuses a destructive control before the pointer moves. 25 tools, no keybindings required, no side effects on your desktop config.
Capabilities
Read the screen
| Tool | Actions | Returns |
|---|---|---|
hypr_read | — | Visible text in reading order, actionable elements (id / role / label / state / rect) and tables (headers + rows) in one call; the DOM is preferred, AT-SPI is the fallback |
hypr_look | — | A magnified capture with a labelled grid, cursor, markers, rectangles and a measure; reports the image-pixel to logical-coordinate mapping |
hypr_overview | — | Every visible window as one contact sheet, each cell labelled with class, title and geometry |
hypr_pixel | — | The composited colour at one point or a rectangle, up to 64 points per capture, blur and opacity included |
hypr_capture | — | A screenshot plus the exact frame and scale that turns an image pixel into a click coordinate |
Act on it
| Tool | Actions | Guarantees |
|---|---|---|
hypr_input | pointer key text scroll | Real virtual-pointer input and keyboard combinations; target clicks by element id, expect waits for the result and reports verified |
hypr_browser | status enable attach tabs select open reload back forward text find tables click fill type key select-option check scroll hover wait prompt evaluate detach | Firefox pages over WebDriver BiDi: clicks are real pointer actions verified by a DOM mutation, fill uses the native setter and reads the value back |
hypr_a11y | apps tree find text tables ensure activate set-text type value select focus scroll-to links document attributes hover wait | The GTK / Qt / Firefox accessibility tree: roles, labels, text, exact rectangles, and whether a page content is published at all |
hypr_clipboard | get set paste history decode types | The Wayland clipboard and cliphist history; paste holds the clipboard until the client has read it |
Arrange the desktop
| Tool | Actions | Notes |
|---|---|---|
hypr_state | sections: summary version monitors workspaces windows activewindow activeworkspace layers devices binds submap cursor configerrors plugins layouts input pointer raw | Reads are cached against event generations, not a timer |
hypr_window | focus close kill float fullscreen pin pseudo center move resize swap cycle_next tag group_* zorder set_prop signal | Coordinate moves are eased and only apply to floating windows |
hypr_workspace | focus create rename move move_window swap_monitors toggle_special change_id | Special (scratchpad) workspaces use special:name |
hypr_layout | state set message scroll help | Per-workspace or global layout, live layout messages, scrolling-tape navigation |
hypr_monitor | state focus dpms configure fake_output | Mode, position, scale, transform, mirror, reserved area, VRR, colour management |
System actions, without keybindings
| Tool | Actions | Notes |
|---|---|---|
hypr_act | volume, microphone, media, brightness, keyboard backlight, airplane mode, touchpad, notifications, do-not-disturb, wallpaper, colour pick, screenshot, launcher, zoom, lock / suspend / power, plus history and undo | Each action is implemented against the backend that exists (wpctl, pamixer, playerctl, brightnessctl, rfkill, swaync, awww) — your keybindings are never read |
hypr_keys | configs list press scripts script | Reads your Hyprland config, bindings and scripts, and can run one binding |
hypr_exec | run notify | Launch through the compositor (window rules apply) or push a notification |
hypr_bar | status toggle reload | Reads bar layers and module labels; hiding and reloading is signal-driven |
hypr_lock | status lock clear | clear only clears a crashed lockscreen, never a live one |
Observe and wait
| Tool | Actions | Notes |
|---|---|---|
hypr_events | recent wait | Event stream with field filters; a timeout is an answer, not an error |
hypr_wait | settle window gone layer layer-gone a11y text modal value | Waits on pixels, windows, layers, text, dialogs and field values |
hypr_app | status enable disable env-for relaunch probe-webview capabilities | Reports what this machine supports: accessibility content, browser bridge, OCR |
hypr_config | get set describe rules bind unbind binds reload errors | 400+ options, window / workspace / layer / monitor rules, runtime binds — all undoable |
hypr_lua | — | Runs a Lua function body inside Hyprland's own persistent state |
hypr_help | all computer pointer coordinates dispatchers rules events selectors layouts | Built-in reference, no guessing at dispatchers |
Install
Hyprland only. The package declares
dsh.bundle.platforms: ["linux"], so a non-Linux host refuses the bundle outright; on a Linux desktop without Hyprland the plugin refuses to load with one clear message instead of registering 25 tools that can only fail.
dsh plugin --profile web add dsh-hyprland
Restart dsh web. The 25 tools and the hyprland-control skill appear in every new session.
Requirements
| Need | Why |
|---|---|
| Hyprland 0.57+ with the Lua configuration provider | Mutations go through hl.dsp / hl.config |
| A Wayland session | The instance signature and WAYLAND_DISPLAY are discovered automatically |
grim | Captures |
wl-copy / wl-paste | Clipboard and non-ASCII typing |
python3 + gi.repository.Atspi | The accessibility bridge |
| Firefox 140+ | Only for hypr_browser (the Remote Agent) |
No font, OCR or screenshot storage is required. The plugin writes nothing outside ~/.cache/dsh-hyprland.
Configuration
Every option is optional; defaults are defined in lib/core/config.js.
hyprland:
capture: { format: jpeg, quality: 80, scale: 1, keepFiles: 50 }
viewer: { enabled: true, fps: 5, scale: 0.5 }
a11y: { enabled: true, allowWrite: true, allowRelaunch: true, autoEnable: true, python: python3 }
browser: { enabled: true, port: 9222, allowEval: true, allowRestart: true }
perf: { stateCacheMs: 150, captureCacheMs: 200, rssWarnMb: 120 }
dryRun: false
safety:
allowExit: false # the five gates below are the only things off by default
allowKill: false
allowUnlock: false
allowPower: false
allowBulkSelect: false
browser.allowEval is on: hypr_browser { action: "evaluate" } works with no configuration.
Safety
- A control labelled delete / remove / clear / reset / uninstall / log out is refused without
confirm: true— the pointer never moves, and the history records the refusal with a text snapshot. hypr_browserclicks are verified by a DOM mutation or a state change;fillreads the value back; a stale element id returnsSTALE_ELEMENTwith candidates instead of clicking where the button was.- Select-all on a table with more than one row is refused by default (
safety.allowBulkSelect). - Exiting Hyprland, SIGKILLing a window, clearing a live lock screen and power actions each need a gate.
- Runtime changes are recorded in a durable ledger and restored after a crash or restart; nothing is ever
written to
~/.config/hypr.
Performance
Measured with scripts/bench.mjs on Hyprland 0.57.2 (eDP-1 1920×1080 @ scale 1.25); ranges reflect
page size and cache warmth.
| Operation | Median |
|---|---|
hypr_state summary | 4–5 ms |
hypr_browser text / find / tables (DOM) | 4–160 ms |
hypr_a11y find (was 588–914 ms before the bridge rewrite) | 31–210 ms |
hypr_a11y text | 35–160 ms |
hypr_clipboard get | 2–4 ms |
hypr_capture / hypr_look | 490–860 ms (grim + encode) |
| Accessibility bridge RSS | 36 MiB |
Verification
Five suites, all green. Nothing in them is mocked: they run against the live compositor and a real Firefox.
| Suite | Covers |
|---|---|
node --test test/ | 155 unit tests: config defaults, state cache, change feed, element registry, action log, BiDi transport, mozLz4, DOM selectors, key tables, Wayland encodings |
scripts/smoke.mjs | 14 read-only connectivity checks |
scripts/acceptance.mjs | 49 scenarios on real GTK / Qt windows, including safety refusals |
scripts/live-verify.mjs | 41 strict scenarios, each re-read from the compositor |
scripts/full-verify.mjs | 42 per-tool checks, both directions |
scripts/browser-verify.mjs | 22 page-bridge scenarios against a bundled fixture |
Architecture
lib/core/ errors, config, state cache, change feed, element registry, action log, clipboard, device note
lib/hypr/ S1 requests, S2 events, instance discovery, Lua dispatch, state reads, key/text injection, recover
lib/wayland/ virtual pointer protocol
lib/a11y/ resident AT-SPI bridge (python), sessions, actions
lib/browser/ Firefox Remote Agent: BiDi transport, page session, DOM helper, sessionstore, enable
lib/safety/ destructive-action and bulk-select classification
lib/desktop/ domain capabilities: act, keys, shell, capture, look, overview, pixel
lib/tools/ the 25 tool definitions
lib/read.js cross-domain read model (DOM first, AT-SPI fallback)
lib/service.js composition root · lib/index.js plugin entry
Dependencies point one way only: core → hypr / wayland / a11y / browser / safety → desktop → tools.
lib/core/ imports nothing above itself.
Documentation
- docs/llms.txt — the entry point for an assistant: where every answer lives
- docs/index.md — the map: which file answers which question
- docs/tools.md — every tool: actions, all parameters with types and defaults, returns, refusals
- docs/modules.md — the layers, every module's exports and dependencies, "where does X live"
- docs/symbols.md — every exported symbol to its file, and back
- docs/errors.md — every error code: what it means and what to do
- docs/developers.md — invariants with check commands, every configuration default, how to add a tool
- docs/marketplace.md — how the listing works, versioning, and the release flow
- CHANGELOG.md — releases, and what changed in each
- docs/index.json — the same indexes as data, for a program
Author
葛墨林 Blog — https://libregml.github.io Configuration reference — https://github.com/LibreGML/ArchConfig
License
GPL-3.0-only. See LICENSE.
Related plugins
archify (deepseek-harness)
tt-a1i/archify
WeKnora (dsh-weknora)
tencent/weknora
next-ai-draw-io (dsh-plugin)
dayuanjiang/next-ai-draw-io
AiToEarn (dsh-plugin-aitoearn)
yikart/aitoearn