From 3b23e709205a9daf03c9b9e53cc8a8c0372a50cb Mon Sep 17 00:00:00 2001 From: danix Date: Thu, 11 Jun 2026 11:03:53 +0200 Subject: fix: help markup uses
+ nbsp padding for qarma layout qarma --info collapses newlines and runs of spaces. Use
for line breaks and   for column padding; --width=600 prevents description wrap. GTK min-width keeps the dialog wide regardless. Co-Authored-By: Claude Opus 4.8 --- tests/wallp.bats | 1 + wallp | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/tests/wallp.bats b/tests/wallp.bats index b78dc35..d16f1a3 100644 --- a/tests/wallp.bats +++ b/tests/wallp.bats @@ -296,6 +296,7 @@ EOF chmod +x "$STUB_DIR/qarma" show_help grep -q "" "$HOME/calls.log" + grep -q "
" "$HOME/calls.log" } @test "bootstrap on missing conf exits zero without setting wallpaper" { diff --git a/wallp b/wallp index 81a9054..f9959ad 100755 --- a/wallp +++ b/wallp @@ -260,21 +260,23 @@ Usage: Config: ~/.config/wallp/wallp.conf" if [ -n "${WAYLAND_DISPLAY:-}" ] && command -v qarma >/dev/null 2>&1; then - # 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) - + # qarma's --info collapses whitespace and newlines: use
for line breaks + # and   (non-breaking space) for the command/description column padding. + local n=" " + local markup="wallp — unified wallpaper manager

\ +Usage
\ +wallp${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n} Show this help
\ +wallp --help | -h${n}${n}${n}${n}${n} Show this help
\ +wallp --set${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n} Interactive (qarma) selection
\ +wallp --set H=<file>${n}${n}${n}${n} Set horizontal screen only
\ +wallp --set V=<file>${n}${n}${n}${n} Set vertical screen only
\ +wallp --set H=<f> V=<f>${n} Set both screens
\ +wallp --restore${n}${n}${n}${n}${n}${n}${n} Restore last session (defaults if none)
\ +wallp --theme <name>${n}${n}${n}${n}${n} Override theme (with --set or --restore)

\ Config: ~/.config/wallp/wallp.conf" - qarma --info --title="wallp help" --text="$markup" 2>/dev/null + # --width prevents qarma from wrapping the description column onto new lines. + # (GTK enforces a minimum dialog width, so the window may look wider.) + qarma --info --width=600 --title="wallp help" --text="$markup" 2>/dev/null else printf '%s\n' "$text" fi -- cgit v1.2.3