Skip to content

v1.1.0

Choose a tag to compare

@jordan-lee-code jordan-lee-code released this 22 Apr 01:46
· 22 commits to main since this release

What's changed

New: validation test suite (tests/validate.sh)

A self-contained bash test suite — no external framework required.

bash tests/validate.sh

40 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 pipefail across all bin/ scripts
  • pick_index() — validated index prompting with re-prompt on bad input
  • require_cmd() — dependency checks with install hints
  • log_error() — xrandr failures written to ~/.config/display-profiles/debug.log
  • Error checking on xrandr execution in display-switch.sh
  • install.sh wires .githooks/ for contributors
  • README: xrandr.sh editing example, Cinnamenu path fix, xrandr failure troubleshooting