Repository navigation
Releases
0.3.0
Added
-
"Follow USB switch" in the Linux tray menu: when the devices learned from a USB switch leave this computer,
ddc-trayswitches the monitor to the other computer's input (0x60), once, and printsddc-tray: follow: switching <monitor-id> to input 0x<hh>. "Learn USB switch" records, within 30 s, the devices that leave together (hubs left out) and the monitor the brightness entries act on, without turning the follow on or writing to the monitor; the target input is one of DisplayPort 1/2 and HDMI 1/2. Turning the follow on needs all three and is the consent to that write; a monitor that does not answer only gets a line on stderr. Settings in$XDG_CONFIG_HOME/ddc-control/usb-follow.json; setup on both machines indocs/usb-switch-follow.md. -
"Start with system" in the tray menu, on Linux and Windows: a checkable item that makes the OS start
ddc-traywhen you log in (~/.config/autostart/*.desktop, orHKCU\...\Run), throughtauri-plugin-autostart. The mark is the OS's own state, read each time the menu opens; it is off on a fresh install and nothing turns it on by itself. -
Security scans on every pull request and push, through the shared pipeline: Gitleaks over the whole history, TruffleHog (verified secrets) over the commits of the push or pull request, Semgrep, Trivy on
Cargo.lockandpackage-lock.json, an SPDX SBOM, and CodeQL for Rust, JavaScript/TypeScript and the GitHub Actions workflows. The results go to the Security tab, and anerrorfinding fails the run. -
SonarQube Cloud analysis on CI, whose Quality Gate fails the run. It covers the Rust code (Sonar's own Rust rules, plus
cargo llvm-covcoverage) and the popup's JS (coverage fromnode --test).scripts/ci/sonar-coverage.shwrites both reports, and runs locally too. -
One
esteira / Portaocheck that fails when any job of the pipeline failed, or when Sonar is off without a written reason. -
An 80% line-coverage floor for the popup's JS modules:
npm run test:unitwritesapps/ddc-tray/coverage/lcov.info, and it measured 88.15%. Before, the CI job printed an error annotation for the missing report and passed.
Fixed
- Switching the monitor's input from the popup or from
ddc-clino longer reads the old input back. After a write of the input source (0x60) the adapter waits, up to 3 s, for the monitor to read the new input, and the popup says so when the monitor keeps another one (it may have no signal on the input asked for) or may have switched away after a failed read.
Changed
- A monitor whose EDID reads but whose DDC/CI does not answer is marked "(on another input)" in the popup's selector, not "(no DDC/CI)", and the tip says it may be on another input or have DDC/CI off in its menu (Portuguese: "(em outra entrada)").
- CI is one call to the shared
pipeline.ymlof slipalison/github-workflows, instead ofversao,qualidadeandlancarcalled one by one. Job names gain theesteira /prefix. v0.1.0 was released before this change, without the security scans, Sonar or the gate. npm testinapps/ddc-trayrunstest:unit(thenode --testsuites, with coverage), then the Playwright suite.
Removed
- The release rehearsal on
ensaio-release/*branches. A draft release there would have to pass the Sonar gate, and SonarQube Cloud's free plan analyzes onlymainand pull requests. The packages of every pull request remain downloadable as run artifacts.
0.3.0
Desde v0.2.0: 1 commit(s).
Novidades
0.2.0
Added
- "Start with system" in the tray menu, on Linux and Windows: a checkable item that makes the OS start
ddc-traywhen you log in (~/.config/autostart/*.desktop, orHKCU\...\Run), throughtauri-plugin-autostart. The mark is the OS's own state, read each time the menu opens; it is off on a fresh install and nothing turns it on by itself. - Security scans on every pull request and push, through the shared pipeline: Gitleaks over the whole history, TruffleHog (verified secrets) over the commits of the push or pull request, Semgrep, Trivy on
Cargo.lockandpackage-lock.json, an SPDX SBOM, and CodeQL for Rust, JavaScript/TypeScript and the GitHub Actions workflows. The results go to the Security tab, and anerrorfinding fails the run. - SonarQube Cloud analysis on CI, whose Quality Gate fails the run. It covers the Rust code (Sonar's own Rust rules, plus
cargo llvm-covcoverage) and the popup's JS (coverage fromnode --test).scripts/ci/sonar-coverage.shwrites both reports, and runs locally too. - One
esteira / Portaocheck that fails when any job of the pipeline failed, or when Sonar is off without a written reason. - An 80% line-coverage floor for the popup's JS modules:
npm run test:unitwritesapps/ddc-tray/coverage/lcov.info, and it measured 88.15%. Before, the CI job printed an error annotation for the missing report and passed.
Fixed
- Switching the monitor's input from the popup or from
ddc-clino longer reads the old input back. After a write of the input source (0x60) the adapter waits, up to 3 s, for the monitor to read the new input, and the popup says so when the monitor keeps another one (it may have no signal on the input asked for) or may have switched away after a failed read.
Changed
- CI is one call to the shared
pipeline.ymlof slipalison/github-workflows, instead ofversao,qualidadeandlancarcalled one by one. Job names gain theesteira /prefix. v0.1.0 was released before this change, without the security scans, Sonar or the gate. npm testinapps/ddc-trayrunstest:unit(thenode --testsuites, with coverage), then the Playwright suite.
Removed
- The release rehearsal on
ensaio-release/*branches. A draft release there would have to pass the Sonar gate, and SonarQube Cloud's free plan analyzes onlymainand pull requests. The packages of every pull request remain downloadable as run artifacts.
0.2.0
Desde v0.1.1: 1 commit(s).
Novidades
0.1.1
Added
- Security scans on every pull request and push, through the shared pipeline: Gitleaks over the whole history, TruffleHog (verified secrets) over the commits of the push or pull request, Semgrep, Trivy on
Cargo.lockandpackage-lock.json, an SPDX SBOM, and CodeQL for Rust, JavaScript/TypeScript and the GitHub Actions workflows. The results go to the Security tab, and anerrorfinding fails the run. - SonarQube Cloud analysis on CI, whose Quality Gate fails the run. It covers the Rust code (Sonar's own Rust rules, plus
cargo llvm-covcoverage) and the popup's JS (coverage fromnode --test).scripts/ci/sonar-coverage.shwrites both reports, and runs locally too. - One
esteira / Portaocheck that fails when any job of the pipeline failed, or when Sonar is off without a written reason. - An 80% line-coverage floor for the popup's JS modules:
npm run test:unitwritesapps/ddc-tray/coverage/lcov.info, and it measured 88.15%. Before, the CI job printed an error annotation for the missing report and passed.
Changed
- CI is one call to the shared
pipeline.ymlof slipalison/github-workflows, instead ofversao,qualidadeandlancarcalled one by one. Job names gain theesteira /prefix. v0.1.0 was released before this change, without the security scans, Sonar or the gate. npm testinapps/ddc-trayrunstest:unit(thenode --testsuites, with coverage), then the Playwright suite.
Removed
- The release rehearsal on
ensaio-release/*branches. A draft release there would have to pass the Sonar gate, and SonarQube Cloud's free plan analyzes onlymainand pull requests. The packages of every pull request remain downloadable as run artifacts.
0.1.1
Desde v0.1.0: 1 commit(s).
Manutenção
0.1.0
Added
- Cargo workspace with two crates,
crates/ddc-coreandcrates/ddc-adapters, sharing workspace lints:unsafe_codedenied; clippyunwrap_used,expect_usedandpanicwarned, withunwrap/expectallowed in tests. ddc-coredomain model:VcpCodewith named MCCS codes,VcpValue,MonitorId,MonitorInfo,Feature(kind, access, risk, allowed values),Confirm,FeatureReadingandDdcError.- Seed risk table (
risk_for_code): brightness, contrast, color preset, RGB gains, volume, sharpness and OSD language areSafe; every other code, including unclassified ones, isDangerous. Capabilities::parse, an in-house, tolerant parser for MCCS capabilities strings, tested against the real string of the "RTK QHD HDR" dev monitor.- Ports
MonitorBackend(driven) andMonitorControl(driving), andSoftwareOsd, which implementsMonitorControl: capabilities cached per monitor, reads never filtered or blocked by the capabilities (unreadable ones count as declaring nothing), and writes guarded by risk confirmation and value validation, then read back. A write whose maximum is not known yet reads the feature once first, whether or not the capabilities declare the code; if that read fails, nothing is written. InMemoryMonitorBackendinddc-adapters: a scripted fake monitor backend with a call log, used by the core's use-case tests.DdcHiMonitorBackendinddc-adapters: the real DDC/CI backend overddc-hi0.4.1 (dxva2on Windows,/dev/i2c-*on Linux, nonvapi/macOS backends), behind the default-on crate featureddc-hi.- It runs on a single worker thread that owns every monitor handle, so it is
Send + Syncwithoutunsafe; a static assertion checks this on every target. - Callers wait per-operation budgets (
DdcHiBudgets: 1 s VCP read/write, 8 s capabilities, 5 s enumeration) and getTimeoutpast them. A job whose caller gave up never reaches the monitor. - No call needs an
enumerate()first: an unknown monitor id costs one enumeration under the enumeration budget, then the call runs under its own budget; an id still missing answersMonitorNotFound. - Failed transactions are retried up to 3 times within the budget, 200 ms apart for VCP reads and writes and 500 ms apart for capabilities reads, then answer
Transport. A VCP code the monitor answers as unsupported (DDC/CI result code0x01) is not retried and answersUnsupportedFeature(Linux;dxva2on Windows keeps that reply to itself). When one more enumeration still fits the rest of the budget (capabilities reads, with the defaults), the monitor is looked up again first, so an unplugged one answersMonitorNotFound. VCP reads and writes skip that check, so a display with mute DDC/CI fails in about 0.4 s. MonitorIds come from EDID (manufacturer-model-serial), else from the device description, elseindex-N, with a#Nsuffix on repeats. Enumeration never probes DDC/CI.- VCP replies map to
current/maxin VESA MCCS byte order. Capabilities replies lose every NUL byte and are decoded lossily.
- It runs on a single worker thread that owns every monitor handle, so it is
FakeMonitor::with_transient_capabilities_failures, to script capabilities reads that fail before succeeding.- Read-only hardware tests (
crates/ddc-adapters/tests/real_monitor.rs),#[ignore]d and gated byDDC_HW_TESTS=1. docs/linux-ddc-setup.md: libudev build headers, loadingi2c-dev, udevuaccessori2cgroup permissions, why never to usesudo, and the proprietary NVIDIA driver caveat.ddc-cli, the command-line binary (crates/ddc-cli):list,caps [--refresh],get <vcp>andset <vcp> <value> [--yes], with--monitorselection (exact id,listindex, or a unique case-insensitive part of an id; never a guess) and--jsonoutput.<vcp>takes decimal,0xhex, or the shortcutsbrightness,contrast,input,preset,volumeandpower.- Dangerous writes need
--yes, decided by the core; there is no prompt. The value read back after a write is printed, with a warning when the monitor ignored it. A code the capabilities do not declare can be written too, such asvolumeon the dev monitor: the core reads its maximum first. - Exit codes: 0 success, 2 usage, 3 monitor selection, 4 invalid feature or value, 5 unconfirmed dangerous write, 6 transport or timeout. A code the monitor refuses as unsupported exits 4, not 6, for
getandset.
CachingMonitorBackendanddefault_cache_dir()inddc-adapters: capabilities strings kept on disk per monitor id (%LOCALAPPDATA%\ddc-control\caps,$XDG_CACHE_HOME/ddc-control/capsor~/.cache/ddc-control/caps), so a warmddc-cli getskips the ~2.5 s capabilities read. Only successful reads the core can parse are stored.invalidatebackscaps --refresh: the file is replaced only by a successful re-read, so a refused refresh keeps it.FakeMonitor::with_vcp_failure, to script a VCP code whose reads and writes fail with a given error.- MCCS feature catalog in
ddc-core(domain::mccs_catalog): one static table of the 39 VCP codes observed on the "RTK QHD HDR" (28 declared, 9 answered without being declared,0xE6/0xF1found by a full read-only scan), each with its MCCS name, CLI name, kind, access, risk and value names, plus the lookups built on it (catalog_entry,catalog_codes,value_name,value_for_name,code_for_alias,hertz,version_from_u16,interpret). MonitorControl::probe_undeclared_featuresandProbedFeature: reads, once each, every catalogued code the capabilities do not declare, telling a code the monitor refuses (UnsupportedFeature) from one it does not answer (Transport/Timeout); one failure never stops the probe, and nothing is written.ddc-cli features [--probe] [--json]: every declared feature with its current value, kind, access, risk and meaning;--probeadds the catalogued codes the capabilities leave out, markednot supported by this monitorornot responding(probe_statusin JSON).ddc-clinames:<vcp>takes any catalog name (sharpness,osd-language,red-black-level,v-frequency…), and<value>takes value names, ignoring case and punctuation (set preset srgb,set preset 6500k,set input hdmi-1 --yes). A name that is no value of the feature being set exits 2 before any monitor is touched.getandsetshow what a value means (1 (0x01) sRGB,514 (0x202) 2.2); JSON gainsvalue_name/interpretedonly when there is one.ddc-cli reset <factory|brightness-contrast|geometry|color> [--yes], the same write asset <code> reset --yes:0x01to0x04/0x05/0x06/0x08, refused without--yes(exit 5), reported as sent since the reset codes are write-only.ddc-tray(apps/ddc-tray), a Tauri 2 system-tray app over the same core, backend and capabilities cache asddc-cli, installed from the release packages (below) or run withcargo run -p ddc-tray.- A 360×560 popup, hidden on focus loss and Esc: brightness, contrast and volume sliders, color preset, input source, power mode, and an "All settings" section loaded on demand, with a read-only probe of the codes the capabilities leave out.
- Sliders write 80 ms after the last move, coalesced, one write in flight per feature; the popup shows the value the monitor reads back.
- Every dangerous change (input, power, dangerous "All settings" entries) goes through a confirmation dialog first;
Confirm::Yesis built only in the app's command layer. - Several monitors: a selector; the popup opens on the last monitor it loaded, else the first whose panel loads. A panel fails when none of its quick controls can be read, so a monitor whose DDC/CI is mute is skipped and marked "(no DDC/CI)" in the selector.
- On Linux the icon is a StatusNotifierItem of the app's own, over
ksni(pure Rust on D-Bus; no AppIndicator library, at build or run time): a left click toggles the popup, the mouse wheel changes the brightness by 5% per notch (0–100%, notches that arrive during a write coalesced into one write), and a right click opens the menu. Its tooltip names the monitor the wheel and the menu act on. - On KDE Plasma under Wayland the popup opens next to the tray icon, inside the screen's work area, with no taskbar entry: the app loads a KWin script over D-Bus at start and unloads it when it quits, through Quit or on SIGTERM, SIGINT or SIGHUP (which quit the app the same way), waiting at most 2 s for KWin; only a SIGKILL or a crash leaves it loaded, matching only the dead process's popup, and the next start replaces it. The script is written only to
$XDG_RUNTIME_DIR; without it none is loaded. Elsewhere the popup opens where the compositor puts it. - Tray menu in English or Brazilian Portuguese, from the system's locale: "Open panel" and "Quit", plus brightness shortcuts 0/25/50/75/100% on Linux. On Windows (Tauri's tray icon) a left click toggles the popup anchored above the icon (not built on Windows yet).
- Lists (monitor selector, color preset, "All settings" lists) are drawn inside the popup, keyboard operable as a WAI-ARIA select-only combobox: a native select's menu is a window of its own, and the popup hid as soon as it opened.
- Popup in English or Brazilian Portuguese, every text from locale keys; light and dark themes; keyboard operable; strict CSP, tested as Tauri embeds it, with any platform config merged; capabilities limited to the app's own commands; single instance.
- The CSP check covers the effective policy of Linux, Windows and macOS alike, each merged as Tauri's build merges it for that target (
the_effective_csp_is_the_strict_policy_on_every_target), and atauri.<platform>.conf.jsonmust not touchapp.security: the policy lives only intauri.conf.json, and the test fails a platform file that changescspor sets adevCsp. - On Linux, a restart at launch with WebKitGTK's DMA-BUF renderer off (
WEBKIT_DISABLE_DMABUF_RENDERER=1) unless the variable is already set: that renderer crashed ...