-
-
Notifications
You must be signed in to change notification settings - Fork 6
Features System
Query and control system-level state: platform info, power management, battery, backlight, hardware pressure, CPU frequency/governor, print services, idle detection, session management, inhibit locks, authentication elevation, and self-update.
Return platform identity, compositor, session type, monitors, workspaces, and idle time in a single response.
deskbrid system.infoResponse:
{
"type": "response",
"status": "ok",
"data": {
"desktop": "gnome",
"desktop_version": "45.0",
"compositor": "gnome-shell",
"session_type": "wayland",
"monitors": [
{"id": 0, "name": "DP-1", "width": 1920, "height": 1080, "scale": 1.0, "primary": true}
],
"workspace_count": 4,
"current_workspace": 0,
"idle_seconds": 300
}
}Run subsystem health checks and return a status map. Useful before dispatching dependent actions.
deskbrid system.healthNo parameters.
List which subsystems are available on the current desktop environment.
deskbrid system.capabilitiesResponse:
{
"type": "response",
"status": "ok",
"data": {
"screenshot": true,
"ocr": true,
"clipboard": true,
"input": true,
"notifications": true,
"mpris": true
}
}Return the confinement profile Kerning the agent — whether it's sandboxed (Flatpak, Snap, container) and which desktop portal capabilities are restricted.
deskbrid system.confinementNo parameters.
Run a pre-flight health check and optionally apply fixes.
| Parameter | Type | Description |
|---|---|---|
check |
string | The health check to run (e.g. "clipboard", "uinput") |
apply |
bool | If true, attempt automatic remediation |
deskbrid system.remediate { check: "uinput", apply: true }Convert coordinates that may use fractional scaling or mixed-monitor layouts into absolute pixel coordinates suitable for mouse and screenshot operations.
| Parameter | Type | Description |
|---|---|---|
x |
float | X coordinate (logical) |
y |
float | Y coordinate (logical) |
monitor |
uint? | Target monitor ID (optional) |
deskbrid system.normalize_coords { x: 1920.5, y: 1080.0, monitor: 0 }Return the current idle time in milliseconds.
deskbrid system.idleResponse:
{"type": "response", "status": "ok", "data": {"idle_ms": 300000}}No parameters.
Trigger a power-state transition.
| Parameter | Type | Description |
|---|---|---|
action |
string | One of: suspend, hibernate, reboot, shutdown, lock
|
deskbrid system.power { action: "suspend" }
deskbrid system.power { action: "reboot" }
deskbrid system.power { action: "shutdown" }
deskbrid system.power { action: "lock" }Return battery status for all connected batteries (or an empty array on a desktop without a battery).
deskbrid system.batteryResponse:
{
"type": "response",
"status": "ok",
"data": [
{"name": "BAT0", "percentage": 85.0, "status": "Charging", "time_remaining": 1800}
]
}No parameters.
List backlight devices available through sysfs (usually in /sys/class/backlight/).
deskbrid system.backlight_listNo parameters.
Get the current brightness for a backlight device. If device is omitted,
returns the first (usually primary) backlight.
| Parameter | Type | Description |
|---|---|---|
device |
string? | Backlight device name (optional) |
deskbrid system.backlight_get { device: "intel_backlight" }Set the brightness for a backlight device.
| Parameter | Type | Description |
|---|---|---|
device |
string? | Backlight device name (optional) |
value |
string | Brightness value; absolute number or percentage (e.g. "50%") |
deskbrid system.backlight_set { device: "intel_backlight", value: "75%" }List installed printers on the system (via CUPS).
deskbrid system.print_listNo parameters.
Set or query the default printer.
| Parameter | Type | Description |
|---|---|---|
printer |
string? | Printer name to set as default (omit to query) |
deskbrid system.print_default { printer: "Brother-HL-L2370DW" }Send a file to a printer.
| Parameter | Type | Description |
|---|---|---|
printer |
string | Target printer name |
path |
string | Absolute path to the file |
deskbrid system.print_file { printer: "Brother-HL-L2370DW", path: "/tmp/report.pdf" }List active and recent print jobs.
deskbrid system.print_job_listNo parameters.
Cancel a print job by ID.
| Parameter | Type | Description |
|---|---|---|
job_id |
string | Job identifier |
deskbrid system.print_job_cancel { job_id: "Brother-42" }Pause a print job.
| Parameter | Type | Description |
|---|---|---|
job_id |
string | Job identifier |
deskbrid system.print_job_pause { job_id: "Brother-42" }Resume a paused print job.
| Parameter | Type | Description |
|---|---|---|
job_id |
string | Job identifier |
deskbrid system.print_job_resume { job_id: "Brother-42" }Return Pressure Stall Information (PSI) — CPU, memory, and I/O pressure metrics. Useful for detecting system overload.
deskbrid system.pressureNo parameters.
Return thermal zone temperatures from the kernel.
deskbrid system.thermal_getResponse:
{
"type": "response",
"status": "ok",
"data": [
{"zone": 0, "type": "x86_pkg_temp", "temp_c": 52.0}
]
}No parameters.
Return current CPU frequencies for all cores.
deskbrid system.cpu_frequencyNo parameters.
Return the current CPU frequency governor (e.g. powersave, performance).
deskbrid system.cpu_governorNo parameters.
Set the CPU frequency governor.
| Parameter | Type | Description |
|---|---|---|
governor |
string | Governor name: performance, powersave, ondemand, conservative, schedutil
|
deskbrid system.cpu_set_governor { governor: "performance" }Acquire a system inhibit lock to prevent idle suspension, screen blanking, or power transitions while a background task runs.
| Parameter | Type | Description |
|---|---|---|
what |
string | Inhibit category: suspend, idle, screen
|
who |
string | Application/inhibitor name (shown in inhibitors UI) |
why |
string? | Human-readable reason (optional) |
mode |
string? |
"block" (default) or "delay" (optional) |
deskbrid system.inhibit {
what: "suspend",
who: "backup-script",
why: "long-running backup"
}Release an inhibit lock acquired earlier.
| Parameter | Type | Description |
|---|---|---|
inhibitor_id |
uint | Cookie returned by system.inhibit
|
deskbrid system.release_inhibit { inhibitor_id: 42 }List active login sessions.
deskbrid system.sessions{"type": "system.sessions"}No parameters.
Lock the current session, or a specific session by ID.
| Parameter | Type | Description |
|---|---|---|
session_id |
string? | Logind session ID (omit for current) |
deskbrid system.lock_session { session_id: "c2" }Switch to another user's session via fast-user-switching.
| Parameter | Type | Description |
|---|---|---|
username |
string | Target user to switch to |
deskbrid system.switch_user { username: "alice" }Check whether a specific action type would require authentication under the current confirmation mode configuration.
| Parameter | Type | Description |
|---|---|---|
action_id |
string | Dot‑notation action name, e.g. "system.power"
|
deskbrid system.check_auth { action_id: "system.power" }Request elevation / confirmation for a privileged action. Provides input to the confirmation mode workflow.
| Parameter | Type | Description |
|---|---|---|
action_id |
string | Dot‑notation action name |
reason |
string? | Optional human-readable reason |
deskbrid system.elevate {
action_id: "system.power",
reason: "User shutdown via agent"
}Check for and apply Deskbrid updates.
| Parameter | Type | Description |
|---|---|---|
check |
bool | If true, only check — do not apply |
force |
bool | If true, force re-download even if up-to-date |
deskbrid system.update { check: true, force: false }from deskbrid import Deskbrid
client = Deskbrid()
# System info
info = client.system_info()
print(info["desktop"], info["session_type"])
# Battery status
batteries = client.system_battery()
for b in batteries:
print(b["name"], b["percentage"], b["status"])
# Backlight
client.system_backlight_set(device="intel_backlight", value="50%")
# Inhibit while doing work
inhibitor = client.system_inhibit(what="suspend", who="my-script", why="busy")
# ... do work ...
client.system_release_inhibit(inhibitor_id=inhibitor["id"])
# Power management
client.system_power(action="suspend")- Power management requires logind (
systemd-logind). - Backlight control requires read/write access to
/sys/class/backlight/(usually in thevideogroup). - Print actions require a running CUPS daemon and the
cupsCLI installed. - PSI pressure metrics read from
/proc/pressure/(kernel ≥ 4.20). - CPU frequency/governor control requires
cpufreqkernel support and appropriate permissions. -
system.updatedownloads from GitHub releases — requires network access.
System health and info queries are typically unbounded. Mutating actions (power,
inhibit, update) may be rate-limited per the agent's permissions.toml.
Stable — system.info, capabilities, power, idle, battery, backlight. Experimental — print, pressure, thermal, CPU frequency/governor, session management, update.
- Accessibility
- Apps
- Audio
- Backlight (LED driver)
- Bluetooth
- Clipboard
- Color Picker
- Desktop Portal
- Desktop Settings
- Files
- Hotkeys
- Input
- Keyboard Layouts
- Media (MPRIS)
- Monitors
- Network
- Notifications
- Print (CUPS)
- Screenshots
- Screen Recording
- Screencast
- Self-Update
- System
- System Tray
- Systemd Units & Timers
- Terminals (PTY)
- Windows & Workspaces