mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
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) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Mateus Pegorim
Claude Opus 4.7
parent
7f85ee7d9d
commit
9d7474095f
@@ -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")"
|
||||
|
||||
Reference in New Issue
Block a user