Split android and default dash layouts
This commit is contained in:
parent
5a940ad8c6
commit
3a519bc657
1 changed files with 90 additions and 50 deletions
|
@ -52,12 +52,11 @@
|
||||||
'face 'font-lock-keyword-face))
|
'face 'font-lock-keyword-face))
|
||||||
|
|
||||||
(defvar enlight-calendar
|
(defvar enlight-calendar
|
||||||
(when (not (equal system-type 'android))
|
|
||||||
(progn
|
(progn
|
||||||
(calendar)
|
(calendar)
|
||||||
(prog1 (with-current-buffer (buffer-name (current-buffer))
|
(prog1 (with-current-buffer (buffer-name (current-buffer))
|
||||||
(concat (buffer-string) "\n\n"))
|
(buffer-string))
|
||||||
(calendar-exit)))))
|
(calendar-exit))))
|
||||||
|
|
||||||
(defun get-weather ()
|
(defun get-weather ()
|
||||||
"Get the weather JSON for THEURGY-CITY."
|
"Get the weather JSON for THEURGY-CITY."
|
||||||
|
@ -87,34 +86,17 @@
|
||||||
(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 :(")))
|
||||||
|
|
||||||
;; Dashboard screen using enlight
|
(defvar default-dash
|
||||||
(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))
|
|
||||||
"\n\n"
|
|
||||||
(grid-make-box `( :content ,(propertize "Theurgy Emacs" 'face 'variable-pitch-serif-text)
|
|
||||||
:width 80 :align center))
|
|
||||||
"\n\n"
|
|
||||||
(grid-make-column
|
|
||||||
(list
|
|
||||||
(grid-make-box
|
|
||||||
`(:content ,(concat
|
`(:content ,(concat
|
||||||
enlight-calendar
|
enlight-calendar "\n\n"
|
||||||
(funcall (if (equal system-type 'android)
|
(grid-make-row
|
||||||
'grid-make-column
|
|
||||||
'grid-make-row)
|
|
||||||
(list (grid-make-box `(:content ,(concat
|
(list (grid-make-box `(:content ,(concat
|
||||||
(enlight-menu
|
(enlight-menu
|
||||||
'(("Exobrain"
|
'(("Exobrain"
|
||||||
("Agenda" (org-agenda nil "a") "a")
|
("Agenda" (org-agenda nil "a") "a")
|
||||||
("Go to Inbox" open-inbox "i")
|
("Go to Inbox" open-inbox "i")
|
||||||
("Capture" org-capture "c")))))
|
("Capture" org-capture "c")))))
|
||||||
:align ,(if (equal system-type 'android)
|
:align left
|
||||||
'center
|
|
||||||
'left)
|
|
||||||
:width 20))
|
:width 20))
|
||||||
(grid-make-box `(:content ,(concat
|
(grid-make-box `(:content ,(concat
|
||||||
(enlight-menu
|
(enlight-menu
|
||||||
|
@ -140,11 +122,69 @@
|
||||||
("Org Scratch" open-org-scratch "o")
|
("Org Scratch" open-org-scratch "o")
|
||||||
("Init Dir" (dired user-emacs-directory) "e")
|
("Init Dir" (dired user-emacs-directory) "e")
|
||||||
("Info" info "h")))))
|
("Info" info "h")))))
|
||||||
:align ,(if (equal system-type 'android)
|
:align right
|
||||||
'center
|
|
||||||
'right)
|
|
||||||
:width 20)))))
|
: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)))
|
||||||
|
|
||||||
|
;; 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))
|
||||||
|
"\n\n"
|
||||||
|
(grid-make-box `( :content ,(propertize "Theurgy Emacs" 'face 'variable-pitch-serif-text)
|
||||||
|
:width 80 :align center))
|
||||||
|
"\n\n"
|
||||||
|
(grid-make-column
|
||||||
|
(list
|
||||||
|
(grid-make-box
|
||||||
|
dashboard-content)
|
||||||
))
|
))
|
||||||
;(grid-make-box `(:content ,(enlight-weather) :align center))
|
;(grid-make-box `(:content ,(enlight-weather) :align center))
|
||||||
)))
|
)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue