dashboard: general refactor & minor visual tweaks
This commit is contained in:
parent
6259ba9114
commit
a07b10e686
1 changed files with 9 additions and 7 deletions
|
@ -166,11 +166,13 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||||
|
|
||||||
(defun doom-dashboard-widget--loaded ()
|
(defun doom-dashboard-widget--loaded ()
|
||||||
(insert
|
(insert
|
||||||
|
"\n"
|
||||||
(propertize
|
(propertize
|
||||||
(+doom-dashboard-center
|
(+doom-dashboard-center
|
||||||
+doom-dashboard--width
|
+doom-dashboard--width
|
||||||
(format "Loaded %d packages in %.02fs"
|
(format "Loaded %d packages in %d modules in %.02fs"
|
||||||
(- (length load-path) (length doom--base-load-path))
|
(- (length load-path) (length doom--base-load-path))
|
||||||
|
(hash-table-size doom-modules)
|
||||||
(if (floatp doom-init-time) doom-init-time 0.0)))
|
(if (floatp doom-init-time) doom-init-time 0.0)))
|
||||||
'face 'font-lock-comment-face)
|
'face 'font-lock-comment-face)
|
||||||
"\n"))
|
"\n"))
|
||||||
|
@ -178,8 +180,8 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||||
(defvar all-the-icons-scale-factor)
|
(defvar all-the-icons-scale-factor)
|
||||||
(defvar all-the-icons-default-adjust)
|
(defvar all-the-icons-default-adjust)
|
||||||
(defun doom-dashboard-widget--shortmenu ()
|
(defun doom-dashboard-widget--shortmenu ()
|
||||||
(let ((all-the-icons-scale-factor 1.3)
|
(let ((all-the-icons-scale-factor 1.45)
|
||||||
(all-the-icons-default-adjust -0.05))
|
(all-the-icons-default-adjust -0.02))
|
||||||
(mapc (lambda (btn)
|
(mapc (lambda (btn)
|
||||||
(when btn
|
(when btn
|
||||||
(cl-destructuring-bind (label icon fn) btn
|
(cl-destructuring-bind (label icon fn) btn
|
||||||
|
@ -190,17 +192,17 @@ whose dimensions may not be fully initialized by the time this is run."
|
||||||
(propertize (concat " " label) 'face 'font-lock-keyword-face))
|
(propertize (concat " " label) 'face 'font-lock-keyword-face))
|
||||||
'action `(lambda (_) ,fn)
|
'action `(lambda (_) ,fn)
|
||||||
'follow-link t)
|
'follow-link t)
|
||||||
(+doom-dashboard-center (1- +doom-dashboard--width) (buffer-string)))
|
(+doom-dashboard-center (- +doom-dashboard--width 2) (buffer-string)))
|
||||||
"\n\n"))))
|
"\n\n"))))
|
||||||
`(("Homepage" "mark-github"
|
`(("Homepage" "mark-github"
|
||||||
(browse-url "https://github.com/hlissner/doom-emacs"))
|
(browse-url "https://github.com/hlissner/doom-emacs"))
|
||||||
,(when (and (and (featurep 'persp-mode) persp-mode)
|
,(when (and (featurep! :feature workspaces)
|
||||||
(file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))
|
(file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))
|
||||||
'("Reload last session" "history"
|
'("Reload last session" "history"
|
||||||
(+workspace/load-session)))
|
(+workspace/load-session)))
|
||||||
("Recently opened files" "file-text"
|
("Recently opened files" "file-text"
|
||||||
(call-interactively (command-remapping 'recentf)))
|
(call-interactively (command-remapping 'recentf-open-files)))
|
||||||
("Recent opened projects" "briefcase"
|
("Open project" "briefcase"
|
||||||
(call-interactively (command-remapping 'projectile-switch-project)))
|
(call-interactively (command-remapping 'projectile-switch-project)))
|
||||||
("Jump to bookmark" "bookmark"
|
("Jump to bookmark" "bookmark"
|
||||||
(call-interactively (command-remapping 'bookmark-jump)))
|
(call-interactively (command-remapping 'bookmark-jump)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue