mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Refactor doom-dashboard-draw-ascii-banner-fn
This commit is contained in:
@ -385,10 +385,7 @@ controlled by `+doom-dashboard-pwd-policy'."
|
|||||||
;;; Widgets
|
;;; Widgets
|
||||||
|
|
||||||
(defun doom-dashboard-draw-ascii-banner-fn ()
|
(defun doom-dashboard-draw-ascii-banner-fn ()
|
||||||
(mapc (lambda (line)
|
(let* ((banner
|
||||||
(insert (propertize (+doom-dashboard--center +doom-dashboard--width line)
|
|
||||||
'face 'doom-dashboard-banner) " ")
|
|
||||||
(insert "\n"))
|
|
||||||
'("================= =============== =============== ======== ========"
|
'("================= =============== =============== ======== ========"
|
||||||
"\\\\ . . . . . . .\\\\ //. . . . . . .\\\\ //. . . . . . .\\\\ \\\\. . .\\\\// . . //"
|
"\\\\ . . . . . . .\\\\ //. . . . . . .\\\\ //. . . . . . .\\\\ \\\\. . .\\\\// . . //"
|
||||||
"||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\\/ . . .||"
|
"||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\\/ . . .||"
|
||||||
@ -407,7 +404,18 @@ controlled by `+doom-dashboard-pwd-policy'."
|
|||||||
"||.==' _-' `' | /==.||"
|
"||.==' _-' `' | /==.||"
|
||||||
"==' _-' E M A C S \\/ `=="
|
"==' _-' E M A C S \\/ `=="
|
||||||
"\\ _-' `-_ /"
|
"\\ _-' `-_ /"
|
||||||
"`'' ``'")))
|
"`'' ``'"))
|
||||||
|
(longest-line (apply #'max (mapcar #'length banner))))
|
||||||
|
(put-text-property
|
||||||
|
(point)
|
||||||
|
(dolist (line banner (point))
|
||||||
|
(insert (+doom-dashboard--center
|
||||||
|
+doom-dashboard--width
|
||||||
|
(concat
|
||||||
|
line (make-string (max 0 (- longest-line (length line)))
|
||||||
|
32)))
|
||||||
|
"\n"))
|
||||||
|
'face 'doom-dashboard-banner)))
|
||||||
|
|
||||||
(defun doom-dashboard-widget-banner ()
|
(defun doom-dashboard-widget-banner ()
|
||||||
(let ((point (point)))
|
(let ((point (point)))
|
||||||
|
Reference in New Issue
Block a user