From 9d7474095f9e6d447fe202c83526727f47696053 Mon Sep 17 00:00:00 2001 From: Mateus Pegorim Date: Thu, 14 May 2026 07:35:36 -0300 Subject: [PATCH] Keep brightness OSD popup width uniform across all percentages (#5806) Pad the percent text to 3 chars with printf so " 5%", " 50%", and "100%" render at identical width in the JetBrainsMono monospace label. Previously the popup container resized between events because the label string varied between 2 and 4 characters, which caused the popup to visibly jump in width on consecutive brightness key presses. Builds on #5525, which made the percent values themselves step uniformly; this completes the loop by making the rendered popup match. Co-authored-by: Mateus Pegorim <14262063+Pegorim@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) --- bin/omarchy-swayosd-brightness | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/omarchy-swayosd-brightness b/bin/omarchy-swayosd-brightness index 8a1e852d..3a533085 100755 --- a/bin/omarchy-swayosd-brightness +++ b/bin/omarchy-swayosd-brightness @@ -12,4 +12,4 @@ progress="$(awk -v p="$percent" 'BEGIN{printf "%.2f", p/100}')" omarchy-swayosd-client \ --custom-icon display-brightness-symbolic \ --custom-progress "$progress" \ - --custom-progress-text "${percent}%" + --custom-progress-text "$(printf '%3d%%' "$percent")"