From 8ab0033b9a7ebc27d8af792f20111eae0ae7b839 Mon Sep 17 00:00:00 2001 From: Frairlyn Camilo Roque Suarez Date: Mon, 22 Jul 2024 08:40:10 -0400 Subject: [PATCH] Fix padding of icons using nerd fonts --- doom-dashboard.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doom-dashboard.el b/doom-dashboard.el index 76b56c6..2d37b4b 100644 --- a/doom-dashboard.el +++ b/doom-dashboard.el @@ -99,7 +99,7 @@ Possible values for list-type are: `recents', `bookmarks', `projects', (icon-name (alist-get 'projects dashboard-heading-icons)) (icon (nerd-icons-octicon icon-name :face 'dashboard-heading))) (if dashboard-display-icons-p - (insert (format "%-3s" icon))) + (insert (string-pad icon 3))) (widget-create 'item :tag (format "%-30s" "Open project") :action (lambda (&rest _) @@ -122,7 +122,7 @@ Possible values for list-type are: `recents', `bookmarks', `projects', (icon-name (alist-get 'agenda dashboard-heading-icons)) (icon (nerd-icons-octicon icon-name :face 'dashboard-heading))) (if dashboard-display-icons-p - (insert (format "%-3s" icon))) + (insert (string-pad icon 3))) (widget-create 'item :tag (format "%-30s" "Open org-agenda") :action (lambda (&rest _) @@ -145,7 +145,7 @@ Possible values for list-type are: `recents', `bookmarks', `projects', (icon-name (alist-get 'bookmarks dashboard-heading-icons)) (icon (nerd-icons-octicon icon-name :face 'dashboard-heading))) (if dashboard-display-icons-p - (insert (format "%-3s" icon))) + (insert (string-pad icon 3))) (widget-create 'item :tag (format "%-30s" "Jump to bookmark") :action (lambda (&rest _) @@ -168,7 +168,7 @@ Possible values for list-type are: `recents', `bookmarks', `projects', (icon-name (alist-get 'recents dashboard-heading-icons)) (icon (nerd-icons-octicon icon-name :face 'dashboard-heading))) (if dashboard-display-icons-p - (insert (format "%-3s" icon))) + (insert (string-pad icon 3))) (widget-create 'item :tag (format "%-30s" "Recently opened files") :action (lambda (&rest _)