More android compat

This commit is contained in:
BirDt_ 2025-09-27 10:04:41 +08:00
parent 0bc99bdb7e
commit 5a940ad8c6

View file

@ -52,11 +52,12 @@
'face 'font-lock-keyword-face))
(defvar enlight-calendar
(when (not (equal system-type 'android))
(progn
(calendar)
(prog1 (with-current-buffer (buffer-name (current-buffer))
(buffer-string))
(calendar-exit))))
(concat (buffer-string) "\n\n"))
(calendar-exit)))))
(defun get-weather ()
"Get the weather JSON for THEURGY-CITY."
@ -101,7 +102,7 @@
(list
(grid-make-box
`(:content ,(concat
enlight-calendar "\n\n"
enlight-calendar
(funcall (if (equal system-type 'android)
'grid-make-column
'grid-make-row)
@ -111,7 +112,7 @@
("Agenda" (org-agenda nil "a") "a")
("Go to Inbox" open-inbox "i")
("Capture" org-capture "c")))))
:align (if (equal system-type 'android)
:align ,(if (equal system-type 'android)
'center
'left)
:width 20))
@ -139,7 +140,7 @@
("Org Scratch" open-org-scratch "o")
("Init Dir" (dired user-emacs-directory) "e")
("Info" info "h")))))
:align (if (equal system-type 'android)
:align ,(if (equal system-type 'android)
'center
'right)
:width 20)))))