aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanix <danix@danix.xyz>2026-06-11 11:03:53 +0200
committerdanix <danix@danix.xyz>2026-06-11 11:03:53 +0200
commit3b23e709205a9daf03c9b9e53cc8a8c0372a50cb (patch)
treeb712552a99b38aafc53753b487d4500748e4367c
parent25eca863522ad8c37770782b5a86a3591093e17e (diff)
downloadwallp-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 &#160; 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.bats1
-rwxr-xr-xwallp30
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" {
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="<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=&lt;file&gt; </tt> Set horizontal screen only
- <tt>wallp --set V=&lt;file&gt; </tt> Set vertical screen only
- <tt>wallp --set H=&lt;f&gt; V=&lt;f&gt; </tt> Set both screens
- <tt>wallp --restore </tt> Restore last session (defaults if none)
- <tt>wallp --theme &lt;name&gt; </tt> Override theme (with --set or --restore)
-
+ # qarma's --info collapses whitespace and newlines: use <br> for line breaks
+ # and &#160; (non-breaking space) for the command/description column padding.
+ local n="&#160;"
+ 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=&lt;file&gt;${n}${n}${n}${n}</tt> Set horizontal screen only<br>\
+<tt>wallp --set V=&lt;file&gt;${n}${n}${n}${n}</tt> Set vertical screen only<br>\
+<tt>wallp --set H=&lt;f&gt; V=&lt;f&gt;${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 &lt;name&gt;${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