You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When brightnessctl set fails, omarchy brightness display --no-osd currently returns success. With OSD enabled, it also continues to the brightness overlay despite the failed change.
Exit nonzero immediately on a failed generic backlight write. The existing backend error remains visible, and no success OSD is shown. Extend the existing brightness regression test to cover failure with and without --no-osd, plus the successful OSD path.
Local host is macOS with Bash 5; the broader local shell suite encounters existing Linux/GNU-tool assumptions. Linux CI is required. No physical brightness or graphical OSD test was performed.
AI-assisted implementation, QA and review using Codex.
Independent review (AI-assisted, Claude). Small change, so this is mostly a confirmation.
Fix
|| exit 1 on the brightnessctl set call is the right minimal change: the DDC branch already does || exit 1 on its setter, so the internal-backlight branch now behaves the same, and the OSD call after it is skipped on failure. brightnessctl's own stderr stays visible, matching what #429 asked for.
Test changes
The new omarchy-osd stub is needed because the success path was never exercised before (PATH includes $ROOT/bin, so without the stub the real omarchy-osd would run).
The flock stub turns the lock into a no-op. Harmless for a sequential test and it is what lets the file run on macOS, but on Linux the real flock would also have been fine, so the stub is a portability choice rather than a requirement. Worth a one-line comment so nobody removes it thinking it hides a bug.
Running the script via bash "$ROOT/bin/…" instead of executing it directly is fine (same interpreter as the shebang on Linux).
The osd_count baseline plus the "no new OSD call" assertion pins the actual regression (OSD after a failed write), not just the exit code.
Out of scope but worth noting for a follow-up: omarchy-brightness-display-apple is called without checking its exit status either, so the Apple-display branch has the same gap.
Local verification (Ubuntu 24.04 arm64 container)
Syntax loop and shellcheck on the changed files: clean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
brightnessctl setfails,omarchy brightness display --no-osdcurrently returns success. With OSD enabled, it also continues to the brightness overlay despite the failed change.Exit nonzero immediately on a failed generic backlight write. The existing backend error remains visible, and no success OSD is shown. Extend the existing brightness regression test to cover failure with and without
--no-osd, plus the successful OSD path.Fixes #429.
Validation:
quattro@79b074ausing an isolatedbrightnessctlstub.git diff --checkpassed.AI-assisted implementation, QA and review using Codex.