From aedb8632ba0aca98c64d3a7bae93e5575b136451 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 17 Jun 2016 01:34:29 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20some=20widgets=E2=80=99=20padding?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mowedline/.config/mowedline/init.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mowedline/.config/mowedline/init.scm b/mowedline/.config/mowedline/init.scm index 1a9e2fe..c5c0fcf 100644 --- a/mowedline/.config/mowedline/init.scm +++ b/mowedline/.config/mowedline/init.scm @@ -8,6 +8,11 @@ text (L " " text " "))) +(define (text-maybe-pad-right text) + (if (not-text? text) + text + (L text " "))) + (define (add-fa-icon icon) (lambda (text) (if (not-text? text) @@ -46,7 +51,7 @@ 'margin-right 15 'background 'transparent (widget:text 'name "taglist" 'format tag-list-formatter) - (widget:active-window-title 'format text-maybe-pad-left) + (widget:active-window-title 'format text-maybe-pad-right) (widget:spacer 'flex 1) (widget:text 'name "mpd" 'format (add-fa-icon "")) @@ -62,4 +67,4 @@ 'font "FontAwesome-10" 'flags '(("Unlocked" color "#65a854" "") ("Locked" color "#a85454" ""))) - (widget:clock)) + (widget:clock 'format text-maybe-pad-left))