chore(config): Refactor Emacs config for cross-platform compatibility

Add Android/Termux support with `*is-android*` constant and
conditional GUI/terminal initialization. Remove maximized frame
defaults and custom.el. Replace corfu with corfu-terminal in
TTY. Add god-mode to terminal config with line number sync. Update
org agenda to use org-ql blocks with super-agenda grouping. Switch
solarized-theme to fork. Clean up redundant functions and unify
keyboard bindings across environments.
This commit is contained in:
User
2026-05-18 20:46:26 +08:00
parent 3469cf8472
commit e2a352709c
20 changed files with 163 additions and 127 deletions

View File

@@ -57,6 +57,24 @@
;; general
(use-package general)
;; god-mode模态编辑
(use-package god-mode
:config
(setq god-mode-enable-function-key-translation nil)
(custom-set-faces
'(god-mode-lighter ((t (:inherit straight-process-error)))))
(defun my-sync-line-numbers-with-god-mode ()
(let ((desired (if (bound-and-true-p god-local-mode)
'relative
t)))
(unless (or (eq display-line-numbers desired) (bound-and-true-p olivetti-mode))
(setq display-line-numbers desired))))
(add-hook 'post-command-hook #'my-sync-line-numbers-with-god-mode)
(setq god-exempt-major-modes
(delete-dups (append '(diff-mode exwm-mode) god-exempt-major-modes))))
(provide 'init-terminal-package)
;;; init-terminal-package.el ends here