repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

spec nuguland brightness popup redesign

d1354bd6ec8f492ae517f68a51c24ca7ad1c2985

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (1)

+121 / −0 text lines

Diff layout

docs/super/specs/2026-07-08-nuguland-brightness-popup-design.md

Added
new file mode 100644

+121 / −0 text lines

1# Nuguland Brightness Popup Redesign
2
3## Goal
4
5Replace the current brightness popup with a compact, useful control surface that works across:
6
7- desktop with only external monitors;
8- laptop with a real backlight device;
9- laptop connected to external monitors.
11No fake controls. No explanatory labels. No debug dump.
13## Research findings
15Current host state:
17- `brightnessctl` exists, but lists only LED devices, not display backlights.
18- `/sys/class/backlight` has no devices.
19- Niri reports two active external displays:
20 - `DP-1` · HKC/KOORUI `27E6QC`
21 - `DP-2` · HKC/KOORUI `27E6QC`
22- EDID confirms both are DisplayPort `27E6QC` monitors.
23- `ddcutil` is not installed.
24- `/dev/i2c-*` exists, but devices are `root:root` mode `600`, unreadable to the user.
25- `pkexec` exists.
27External 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.
29Implication: current desktop should show DDC setup, not a fake brightness slider.
31## Accepted visual direction
33Use 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.
35### Current desktop / no controllable display
37Show:
39- `setup DDC` primary button.
40- Detected external monitor rows.
41- Issue badge only where needed: `DDC?`.
43Do not show:
45- fake percent hero;
46- fake global slider;
47- fake built-in display row.
49### Laptop / controllable display
51If a real `/sys/class/backlight/*` device exists, show a built-in display row.
53If external monitors are also connected, show them as additional rows.
55### Ready state
57When at least one display is controllable:
59- Show a global control at the top.
60- Show presets below it: `25%`, `50%`, `75%`, `100%`.
61- Show one row per display with a compact slider and percent.
62- Do not show `ready`; readiness is implied by control availability.
63- Show issue badges only for problems.
65### Mixed state
67When controllable displays have different brightness values:
69- The global control becomes a merged multislider: one contiguous track split into stacked bars, no vertical gaps.
70- No `mixed` text label.
71- Clicking or dragging the global control sets all controllable displays to that value.
72- Presets also set all controllable displays.
73- Per-display rows keep independent control.
75### Synced state
77When all controllable displays share the same value:
79- The global control can render as one normal filled bar.
80- Clicking or dragging still sets all controllable displays.
82## DDC setup behavior
84`setup DDC` should start a privileged setup flow via `pkexec`.
86Minimum setup responsibilities:
881. Install or require `ddcutil`.
892. Ensure `i2c-dev` is loaded.
903. Apply permissions for `/dev/i2c-*` using the distro-supported `ddcutil` udev rules or equivalent.
914. Re-run detection.
925. Mark external displays controllable only after `getvcp 10` succeeds.
94The agent must not run privileged setup itself. Nuguland may expose a user-triggered `pkexec` action.
96## Gestalt fixes
98- Figure-ground: either setup CTA or real brightness control is the figure; never both fake and equal-weight.
99- Proximity: global control, presets, and per-display rows are distinct groups.
100- Similarity: all display rows share one visual grammar.
101- Common region: issue state appears only on the affected row.
102- Prägnanz: remove redundant labels like `ready`, `mixed`, and explanatory helper text.
104## Implementation scope
106Likely files:
108- `quickshell/nuguland/Brightness.qml`
109- `quickshell/nuguland/brightness.js`
110- `quickshell/nuguland/brightness.test.js`
111- `quickshell/nuguland/BrightnessPanel.qml`
112- `quickshell/nuguland/SurfaceManager.qml` if sizing needs adjustment
114Keep `BrightnessPanel.qml` visual-only where possible. Put pure shaping in `brightness.js` and test it with Node.
116## Verification
118- Add/extend Node tests for brightness shaping: display rows, controllable detection, mixed/synced global state.
119- Run `cd quickshell/nuguland && node brightness.test.js`.
120- Run `cd quickshell/nuguland && just lint`.
121- Visual-check the popup screenshot against the accepted mockup before calling it done.