From 25eca863522ad8c37770782b5a86a3591093e17e Mon Sep 17 00:00:00 2001 From: danix Date: Thu, 11 Jun 2026 10:51:15 +0200 Subject: feat: render help with Pango markup in qarma qarma --info supports Pango markup; bold headers + monospace command column. Stdout path stays plain text (no tags leak to terminal). Co-Authored-By: Claude Opus 4.8 --- tests/wallp.bats | 20 ++++++++++++++++++++ wallp | 16 +++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/tests/wallp.bats b/tests/wallp.bats index e809c13..b78dc35 100644 --- a/tests/wallp.bats +++ b/tests/wallp.bats @@ -278,6 +278,26 @@ EOF [[ "$output" == *"Usage"* ]] } +@test "stdout help has no pango markup tags" { + unset WAYLAND_DISPLAY + run show_help + [[ "$output" != *""* ]] + [[ "$output" != *""* ]] + [[ "$output" == *"Usage"* ]] +} + +@test "qarma help uses pango markup" { + export WAYLAND_DISPLAY="wayland-0" + cat > "$STUB_DIR/qarma" <> "$TMP_HOME/calls.log" +exit 0 +EOF + chmod +x "$STUB_DIR/qarma" + show_help + grep -q "" "$HOME/calls.log" +} + @test "bootstrap on missing conf exits zero without setting wallpaper" { unset WAYLAND_DISPLAY run main --restore diff --git a/wallp b/wallp index 339b0dc..81a9054 100755 --- a/wallp +++ b/wallp @@ -260,7 +260,21 @@ Usage: Config: ~/.config/wallp/wallp.conf" if [ -n "${WAYLAND_DISPLAY:-}" ] && command -v qarma >/dev/null 2>&1; then - qarma --info --title="wallp help" --text="$text" 2>/dev/null + # qarma renders Pango markup in --info: bold headers, monospace commands. + local markup="wallp — unified wallpaper manager + +Usage + wallp Show this help + wallp --help | -h Show this help + wallp --set Interactive (qarma) selection + wallp --set H=<file> Set horizontal screen only + wallp --set V=<file> Set vertical screen only + wallp --set H=<f> V=<f> Set both screens + wallp --restore Restore last session (defaults if none) + wallp --theme <name> Override theme (with --set or --restore) + +Config: ~/.config/wallp/wallp.conf" + qarma --info --title="wallp help" --text="$markup" 2>/dev/null else printf '%s\n' "$text" fi -- cgit v1.2.3