spec nuguland brightness popup redesign
d1354bd6ec8f492ae517f68a51c24ca7ad1c2985
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: 1d339b96a8bb
bugabingas dorkfiles
d1354bd6ec8f492ae517f68a51c24ca7ad1c2985
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+121 / −0 text lines
new file mode 100644+121 / −0 text lines
# Nuguland Brightness Popup Redesign## GoalReplace the current brightness popup with a compact, useful control surface that works across:- desktop with only external monitors;- laptop with a real backlight device;- laptop connected to external monitors.No fake controls. No explanatory labels. No debug dump.## Research findingsCurrent host state:- `brightnessctl` exists, but lists only LED devices, not display backlights.- `/sys/class/backlight` has no devices.- Niri reports two active external displays: - `DP-1` · HKC/KOORUI `27E6QC` - `DP-2` · HKC/KOORUI `27E6QC`- EDID confirms both are DisplayPort `27E6QC` monitors.- `ddcutil` is not installed.- `/dev/i2c-*` exists, but devices are `root:root` mode `600`, unreadable to the user.- `pkexec` exists.External monitor brightness on Linux is normally DDC/CI / MCCS over I2C. Brightness is VCP feature `0x10`. The monitor support question cannot be answered from EDID alone; it must be tested with `ddcutil detect` and `ddcutil getvcp 10` after `ddcutil` and I2C permissions are available.Implication: current desktop should show DDC setup, not a fake brightness slider.## Accepted visual directionUse the accepted mockup: no header label, dark compact Nuguland card, setup button only while DDC is unresolved, one merged global multislider, and per-display rows.### Current desktop / no controllable displayShow:- `setup DDC` primary button.- Detected external monitor rows.- Issue badge only where needed: `DDC?`.Do not show:- fake percent hero;- fake global slider;- fake built-in display row.### Laptop / controllable displayIf a real `/sys/class/backlight/*` device exists, show a built-in display row.If external monitors are also connected, show them as additional rows.### Ready stateWhen at least one display is controllable:- Show a global control at the top.- Show presets below it: `25%`, `50%`, `75%`, `100%`.- Show one row per display with a compact slider and percent.- Do not show `ready`; readiness is implied by control availability.- Show issue badges only for problems.### Mixed stateWhen controllable displays have different brightness values:- The global control becomes a merged multislider: one contiguous track split into stacked bars, no vertical gaps.- No `mixed` text label.- Clicking or dragging the global control sets all controllable displays to that value.- Presets also set all controllable displays.- Per-display rows keep independent control.### Synced stateWhen all controllable displays share the same value:- The global control can render as one normal filled bar.- Clicking or dragging still sets all controllable displays.## DDC setup behavior`setup DDC` should start a privileged setup flow via `pkexec`.Minimum setup responsibilities:1. Install or require `ddcutil`.2. Ensure `i2c-dev` is loaded.3. Apply permissions for `/dev/i2c-*` using the distro-supported `ddcutil` udev rules or equivalent.4. Re-run detection.5. Mark external displays controllable only after `getvcp 10` succeeds.The agent must not run privileged setup itself. Nuguland may expose a user-triggered `pkexec` action.## Gestalt fixes- Figure-ground: either setup CTA or real brightness control is the figure; never both fake and equal-weight.- Proximity: global control, presets, and per-display rows are distinct groups.- Similarity: all display rows share one visual grammar.- Common region: issue state appears only on the affected row.- Prägnanz: remove redundant labels like `ready`, `mixed`, and explanatory helper text.## Implementation scopeLikely files:- `quickshell/nuguland/Brightness.qml`- `quickshell/nuguland/brightness.js`- `quickshell/nuguland/brightness.test.js`- `quickshell/nuguland/BrightnessPanel.qml`- `quickshell/nuguland/SurfaceManager.qml` if sizing needs adjustmentKeep `BrightnessPanel.qml` visual-only where possible. Put pure shaping in `brightness.js` and test it with Node.## Verification- Add/extend Node tests for brightness shaping: display rows, controllable detection, mixed/synced global state.- Run `cd quickshell/nuguland && node brightness.test.js`.- Run `cd quickshell/nuguland && just lint`.- Visual-check the popup screenshot against the accepted mockup before calling it done.