lazy execution

This commit is contained in:
BirDt_ 2025-09-27 10:37:39 +08:00
parent aa27a46d65
commit 311990b5b0

View file

@ -86,12 +86,8 @@
(concat (propertize "Weather\n\n" 'face 'font-lock-keyword-face)
"No connection to weather service :(")))
;; Dashboard screen using enlight
(use-package enlight
:custom
(setopt grid-revert-on-width-change t)
(defvar default-dash
(defun default-dash ()
"Returns the default dashboard."
`(:content ,(concat
enlight-calendar "\n\n"
(grid-make-row
@ -131,7 +127,8 @@
:width 20)))))
))
(defvar android-dash
(defun android-dash ()
"Returns the android dashboard."
`(:content ,(concat
(grid-make-row
(list (grid-make-column (grid-make-box `(:content ,(concat
@ -170,11 +167,17 @@
:width 20))))))
))
(defvar dashboard-content
(defun dashboard-content ()
"Gets the dashboard content for the current platform."
(cond
((equal system-type 'android) android-dash)
(else default-dash)))
((equal system-type 'android) (android-dash))
(else (default-dash))))
;; Dashboard screen using enlight
(use-package enlight
:custom
(setopt grid-revert-on-width-change t)
(enlight-content
(concat
(grid-make-box `(:align center :content ,enlight-theurgy-logo :width 80))