lazy execution
This commit is contained in:
parent
aa27a46d65
commit
311990b5b0
1 changed files with 89 additions and 86 deletions
|
@ -86,95 +86,98 @@
|
||||||
(concat (propertize "Weather\n\n" 'face 'font-lock-keyword-face)
|
(concat (propertize "Weather\n\n" 'face 'font-lock-keyword-face)
|
||||||
"No connection to weather service :(")))
|
"No connection to weather service :(")))
|
||||||
|
|
||||||
|
(defun default-dash ()
|
||||||
|
"Returns the default dashboard."
|
||||||
|
`(:content ,(concat
|
||||||
|
enlight-calendar "\n\n"
|
||||||
|
(grid-make-row
|
||||||
|
(list (grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Exobrain"
|
||||||
|
("Agenda" (org-agenda nil "a") "a")
|
||||||
|
("Go to Inbox" open-inbox "i")
|
||||||
|
("Capture" org-capture "c")))))
|
||||||
|
:align left
|
||||||
|
:width 20))
|
||||||
|
(grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Projects"
|
||||||
|
("Switch To" theurgy-open-project "p")
|
||||||
|
("Project List" theurgy-edit-projects-list "l")))))
|
||||||
|
:align center
|
||||||
|
:width 20))
|
||||||
|
(grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Userland"
|
||||||
|
("Dired" (dired "~") "d")
|
||||||
|
("RSS" elfeed "r")
|
||||||
|
("Terminal" theurgy-bottom-shell "t")
|
||||||
|
("Gomuks" theurgy-gomuks-workspace "G")
|
||||||
|
("Weather" theurgy-show-weather "w")))))
|
||||||
|
:align center
|
||||||
|
:width 20))
|
||||||
|
(grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Meta"
|
||||||
|
("Elisp Scratch" open-elisp-scratch "s")
|
||||||
|
("Org Scratch" open-org-scratch "o")
|
||||||
|
("Init Dir" (dired user-emacs-directory) "e")
|
||||||
|
("Info" info "h")))))
|
||||||
|
:align right
|
||||||
|
:width 20)))))
|
||||||
|
))
|
||||||
|
|
||||||
|
(defun android-dash ()
|
||||||
|
"Returns the android dashboard."
|
||||||
|
`(:content ,(concat
|
||||||
|
(grid-make-row
|
||||||
|
(list (grid-make-column (grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Exobrain"
|
||||||
|
("Agenda" (org-agenda nil "a") "a")
|
||||||
|
("Go to Inbox" open-inbox "i")
|
||||||
|
("Capture" org-capture "c")))))
|
||||||
|
:align center
|
||||||
|
:width 20))
|
||||||
|
(grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Projects"
|
||||||
|
("Switch To" theurgy-open-project "p")
|
||||||
|
("Project List" theurgy-edit-projects-list "l")))))
|
||||||
|
:align center
|
||||||
|
:width 20)))
|
||||||
|
(grid-make-column (grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Userland"
|
||||||
|
("Dired" (dired "~") "d")
|
||||||
|
("RSS" elfeed "r")
|
||||||
|
("Terminal" theurgy-bottom-shell "t")
|
||||||
|
("Gomuks" theurgy-gomuks-workspace "G")
|
||||||
|
("Weather" theurgy-show-weather "w")))))
|
||||||
|
:align center
|
||||||
|
:width 20))
|
||||||
|
(grid-make-box `(:content ,(concat
|
||||||
|
(enlight-menu
|
||||||
|
'(("Meta"
|
||||||
|
("Elisp Scratch" open-elisp-scratch "s")
|
||||||
|
("Org Scratch" open-org-scratch "o")
|
||||||
|
("Init Dir" (dired user-emacs-directory) "e")
|
||||||
|
("Info" info "h")))))
|
||||||
|
:align center
|
||||||
|
:width 20))))))
|
||||||
|
))
|
||||||
|
|
||||||
|
(defun dashboard-content ()
|
||||||
|
"Gets the dashboard content for the current platform."
|
||||||
|
(cond
|
||||||
|
((equal system-type 'android) (android-dash))
|
||||||
|
(else (default-dash))))
|
||||||
|
|
||||||
|
|
||||||
;; Dashboard screen using enlight
|
;; Dashboard screen using enlight
|
||||||
(use-package enlight
|
(use-package enlight
|
||||||
:custom
|
:custom
|
||||||
(setopt grid-revert-on-width-change t)
|
(setopt grid-revert-on-width-change t)
|
||||||
|
|
||||||
(defvar default-dash
|
|
||||||
`(:content ,(concat
|
|
||||||
enlight-calendar "\n\n"
|
|
||||||
(grid-make-row
|
|
||||||
(list (grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Exobrain"
|
|
||||||
("Agenda" (org-agenda nil "a") "a")
|
|
||||||
("Go to Inbox" open-inbox "i")
|
|
||||||
("Capture" org-capture "c")))))
|
|
||||||
:align left
|
|
||||||
:width 20))
|
|
||||||
(grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Projects"
|
|
||||||
("Switch To" theurgy-open-project "p")
|
|
||||||
("Project List" theurgy-edit-projects-list "l")))))
|
|
||||||
:align center
|
|
||||||
:width 20))
|
|
||||||
(grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Userland"
|
|
||||||
("Dired" (dired "~") "d")
|
|
||||||
("RSS" elfeed "r")
|
|
||||||
("Terminal" theurgy-bottom-shell "t")
|
|
||||||
("Gomuks" theurgy-gomuks-workspace "G")
|
|
||||||
("Weather" theurgy-show-weather "w")))))
|
|
||||||
:align center
|
|
||||||
:width 20))
|
|
||||||
(grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Meta"
|
|
||||||
("Elisp Scratch" open-elisp-scratch "s")
|
|
||||||
("Org Scratch" open-org-scratch "o")
|
|
||||||
("Init Dir" (dired user-emacs-directory) "e")
|
|
||||||
("Info" info "h")))))
|
|
||||||
:align right
|
|
||||||
:width 20)))))
|
|
||||||
))
|
|
||||||
|
|
||||||
(defvar android-dash
|
|
||||||
`(:content ,(concat
|
|
||||||
(grid-make-row
|
|
||||||
(list (grid-make-column (grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Exobrain"
|
|
||||||
("Agenda" (org-agenda nil "a") "a")
|
|
||||||
("Go to Inbox" open-inbox "i")
|
|
||||||
("Capture" org-capture "c")))))
|
|
||||||
:align center
|
|
||||||
:width 20))
|
|
||||||
(grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Projects"
|
|
||||||
("Switch To" theurgy-open-project "p")
|
|
||||||
("Project List" theurgy-edit-projects-list "l")))))
|
|
||||||
:align center
|
|
||||||
:width 20)))
|
|
||||||
(grid-make-column (grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Userland"
|
|
||||||
("Dired" (dired "~") "d")
|
|
||||||
("RSS" elfeed "r")
|
|
||||||
("Terminal" theurgy-bottom-shell "t")
|
|
||||||
("Gomuks" theurgy-gomuks-workspace "G")
|
|
||||||
("Weather" theurgy-show-weather "w")))))
|
|
||||||
:align center
|
|
||||||
:width 20))
|
|
||||||
(grid-make-box `(:content ,(concat
|
|
||||||
(enlight-menu
|
|
||||||
'(("Meta"
|
|
||||||
("Elisp Scratch" open-elisp-scratch "s")
|
|
||||||
("Org Scratch" open-org-scratch "o")
|
|
||||||
("Init Dir" (dired user-emacs-directory) "e")
|
|
||||||
("Info" info "h")))))
|
|
||||||
:align center
|
|
||||||
:width 20))))))
|
|
||||||
))
|
|
||||||
|
|
||||||
(defvar dashboard-content
|
|
||||||
(cond
|
|
||||||
((equal system-type 'android) android-dash)
|
|
||||||
(else default-dash)))
|
|
||||||
|
|
||||||
(enlight-content
|
(enlight-content
|
||||||
(concat
|
(concat
|
||||||
(grid-make-box `(:align center :content ,enlight-theurgy-logo :width 80))
|
(grid-make-box `(:align center :content ,enlight-theurgy-logo :width 80))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue