Refactor doom-dashboard-draw-ascii-banner-fn
This commit is contained in:
parent
03fe396eea
commit
86c2f05252
1 changed files with 31 additions and 23 deletions
|
@ -385,10 +385,7 @@ controlled by `+doom-dashboard-pwd-policy'."
|
|||
;;; Widgets
|
||||
|
||||
(defun doom-dashboard-draw-ascii-banner-fn ()
|
||||
(mapc (lambda (line)
|
||||
(insert (propertize (+doom-dashboard--center +doom-dashboard--width line)
|
||||
'face 'doom-dashboard-banner) " ")
|
||||
(insert "\n"))
|
||||
(let* ((banner
|
||||
'("================= =============== =============== ======== ========"
|
||||
"\\\\ . . . . . . .\\\\ //. . . . . . .\\\\ //. . . . . . .\\\\ \\\\. . .\\\\// . . //"
|
||||
"||. . ._____. . .|| ||. . ._____. . .|| ||. . ._____. . .|| || . . .\\/ . . .||"
|
||||
|
@ -407,7 +404,18 @@ controlled by `+doom-dashboard-pwd-policy'."
|
|||
"||.==' _-' `' | /==.||"
|
||||
"==' _-' 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 ()
|
||||
(let ((point (point)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue