Repository navigation
v1.1.0
What's changed
New: validation test suite (tests/validate.sh)
A self-contained bash test suite — no external framework required.
bash tests/validate.sh40 tests across 5 sections:
| Section | What's covered |
|---|---|
| Syntax | bash -n on every script and hook |
| Unit tests | All lib/common.sh functions: path helpers, detect_de (7 DE variants), require_cmd, log_error, list_profiles, pick_index |
| Smoke test | display-setup.sh against live xrandr |
| Error paths | No-args usage, missing profiles, missing/failing xrandr.sh (with debug.log write verification), display-apply-saved.sh absent/empty state |
| Live round-trip | Builds a temp profile matching the current display config, runs display-switch.sh against real xrandr, verifies display-mode is updated, cleans up |
Sections requiring a running X session are skipped automatically when DISPLAY is not set.
Also included in this release (from v1.0.1):
set -euo pipefailacross allbin/scriptspick_index()— validated index prompting with re-prompt on bad inputrequire_cmd()— dependency checks with install hintslog_error()— xrandr failures written to~/.config/display-profiles/debug.log- Error checking on xrandr execution in
display-switch.sh install.shwires.githooks/for contributors- README: xrandr.sh editing example, Cinnamenu path fix, xrandr failure troubleshooting