diff options
| author | danix <danix@danix.xyz> | 2026-06-11 11:03:53 +0200 |
|---|---|---|
| committer | danix <danix@danix.xyz> | 2026-06-11 11:03:53 +0200 |
| commit | 3b23e709205a9daf03c9b9e53cc8a8c0372a50cb (patch) | |
| tree | b712552a99b38aafc53753b487d4500748e4367c | |
| parent | 25eca863522ad8c37770782b5a86a3591093e17e (diff) | |
| download | wallp-3b23e709205a9daf03c9b9e53cc8a8c0372a50cb.tar.gz wallp-3b23e709205a9daf03c9b9e53cc8a8c0372a50cb.zip | |
fix: help markup uses <br> + nbsp padding for qarma layout
qarma --info collapses newlines and runs of spaces. Use <br> 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 <noreply@anthropic.com>
| -rw-r--r-- | tests/wallp.bats | 1 | ||||
| -rwxr-xr-x | 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 "<b>" "$HOME/calls.log" + grep -q "<br>" "$HOME/calls.log" } @test "bootstrap on missing conf exits zero without setting wallpaper" { @@ -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="<b>wallp</b> — unified wallpaper manager - -<b>Usage</b> - <tt>wallp </tt> Show this help - <tt>wallp --help | -h </tt> Show this help - <tt>wallp --set </tt> Interactive (qarma) selection - <tt>wallp --set H=<file> </tt> Set horizontal screen only - <tt>wallp --set V=<file> </tt> Set vertical screen only - <tt>wallp --set H=<f> V=<f> </tt> Set both screens - <tt>wallp --restore </tt> Restore last session (defaults if none) - <tt>wallp --theme <name> </tt> Override theme (with --set or --restore) - + # qarma's --info collapses whitespace and newlines: use <br> for line breaks + # and   (non-breaking space) for the command/description column padding. + local n=" " + local markup="<b>wallp</b> — unified wallpaper manager<br><br>\ +<b>Usage</b><br>\ +<tt>wallp${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}</tt> Show this help<br>\ +<tt>wallp --help | -h${n}${n}${n}${n}${n}</tt> Show this help<br>\ +<tt>wallp --set${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}${n}</tt> Interactive (qarma) selection<br>\ +<tt>wallp --set H=<file>${n}${n}${n}${n}</tt> Set horizontal screen only<br>\ +<tt>wallp --set V=<file>${n}${n}${n}${n}</tt> Set vertical screen only<br>\ +<tt>wallp --set H=<f> V=<f>${n}</tt> Set both screens<br>\ +<tt>wallp --restore${n}${n}${n}${n}${n}${n}${n}</tt> Restore last session (defaults if none)<br>\ +<tt>wallp --theme <name>${n}${n}${n}${n}${n}</tt> Override theme (with --set or --restore)<br><br>\ <b>Config:</b> <tt>~/.config/wallp/wallp.conf</tt>" - 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 |
