From 75fff1e3a7768f5ddf7c180b5cfe8dc88485dada Mon Sep 17 00:00:00 2001 From: User Date: Tue, 9 Jun 2026 02:22:56 +0800 Subject: [PATCH] refactor: improve cross-platform and theme consistency --- lisp/init-dired.el | 7 ++++--- lisp/init-exwm.el | 13 ++++++++++++- lisp/init-prog.el | 2 +- lisp/init-ui.el | 6 ++---- lisp/init-window.el | 1 + lisp/my-base16-dark-theme.el | 6 +++--- lisp/my-base16-light-theme.el | 7 ++++--- 7 files changed, 27 insertions(+), 15 deletions(-) diff --git a/lisp/init-dired.el b/lisp/init-dired.el index f7950f8..cba29b2 100644 --- a/lisp/init-dired.el +++ b/lisp/init-dired.el @@ -117,18 +117,19 @@ trashed-date-format "%Y-%m-%d %H:%M:%S")) ;; discomfort,挂载硬盘 -(use-package debase +(when *is-linux* + (use-package debase :straight (debase :type git :host codeberg :repo "emacs-weirdware/debase")) -(use-package discomfort + (use-package discomfort :commands discomfort :straight (discomfort :type git :host codeberg - :repo "emacs-weirdware/discomfort")) + :repo "emacs-weirdware/discomfort"))) (provide 'init-dired) diff --git a/lisp/init-exwm.el b/lisp/init-exwm.el index 51e845b..a0bd009 100644 --- a/lisp/init-exwm.el +++ b/lisp/init-exwm.el @@ -140,13 +140,24 @@ :host github :repo "emacs-exwm/xdg-launcher") :bind - (("s-SPC" . xdg-launcher-run-app)) + (("s-SPC" . xdg-launcher-run-app)) :init (with-eval-after-load 'consult (unless (memq 'xdg-launcher-consult-source consult-buffer-sources) (setq consult-buffer-sources (append consult-buffer-sources '(xdg-launcher-consult-source))))))) +(when *is-mac* + ;; launcher + (use-package launcher + :straight + (launcher + :type git + :host github + :repo "xiaoxinghu/launcher.el") + :bind + ("s-SPC" . launcher))) + (provide 'init-exwm) ;;; init-exwm.el ends here diff --git a/lisp/init-prog.el b/lisp/init-prog.el index f8c3556..2c18844 100644 --- a/lisp/init-prog.el +++ b/lisp/init-prog.el @@ -1,4 +1,4 @@ -;;; init.el --- init.el -*- lexical-binding: t -*- +;;; init-prog.el --- programming -*- lexical-binding: t -*- ;;; Commentary: diff --git a/lisp/init-ui.el b/lisp/init-ui.el index 0738f5d..f3e771d 100644 --- a/lisp/init-ui.el +++ b/lisp/init-ui.el @@ -100,10 +100,8 @@ (use-package time :if (not *is-android*) - :init - (if *is-linux* - (add-hook 'exwm-wm-mode-hook 'display-time-mode) - (add-hook 'after-init-hook 'display-time-mode)) + :hook + (persp-mode . display-time-mode) :config (setq display-time-default-load-average nil display-time-string-forms diff --git a/lisp/init-window.el b/lisp/init-window.el index 47d7026..c13cd4d 100644 --- a/lisp/init-window.el +++ b/lisp/init-window.el @@ -38,6 +38,7 @@ "\\*Edit Annotation.*\\*" "\\*Flutter\\*" "\\*Ibuffer\\*" + "^\\*Finder-" "Buffers\\*$" "^\\*Geiser" "\\*gptel-Kimi-Code\\*" diff --git a/lisp/my-base16-dark-theme.el b/lisp/my-base16-dark-theme.el index 14ac5ed..cf0fc81 100644 --- a/lisp/my-base16-dark-theme.el +++ b/lisp/my-base16-dark-theme.el @@ -59,9 +59,9 @@ `(dired-async-mode-message ((,class (:foreground ,red)))) `(dired-async-message ((,class (:foreground ,yellow)))) `(consult-file ((,class (:foreground ,green)))) - `(consult-notes-name ((,class (:foreground ,base01 :weight bold)))) - `(consult-notes-time ((,class (:foreground ,base01 :weight thin)))) - `(consult-notes-size ((,class (:foreground ,base01 :weight thin)))) + `(consult-notes-name ((,class (:foreground ,base01)))) + `(consult-notes-time ((,class (:foreground ,base01)))) + `(consult-notes-size ((,class (:foreground ,base01)))) `(denote-faces-keywords ((,class (:foreground ,cyan)))) `(mode-line ((,class (:foreground ,base0 :background ,base02)))) `(mode-line-inactive ((,class (:foreground ,base01 :background ,base03)))) diff --git a/lisp/my-base16-light-theme.el b/lisp/my-base16-light-theme.el index 050c417..26fdc8e 100644 --- a/lisp/my-base16-light-theme.el +++ b/lisp/my-base16-light-theme.el @@ -18,6 +18,7 @@ my-base16-light-core-palette '((custom-theme-set-faces theme-name + `(italic ((,class (:slant italic)))) `(org-level-1 ((,class (:foreground ,orange :height 1.0 :weight normal)))) `(org-level-2 ((,class (:foreground ,blue :height 1.0 :weight normal)))) `(org-level-3 ((,class (:foreground ,green :height 1.0 :weight normal)))) @@ -58,9 +59,9 @@ `(dired-async-mode-message ((,class (:foreground ,red)))) `(dired-async-message ((,class (:foreground ,yellow)))) `(consult-file ((,class (:foreground ,green)))) - `(consult-notes-name ((,class (:foreground ,base01 :weight bold)))) - `(consult-notes-time ((,class (:foreground ,base01 :weight thin)))) - `(consult-notes-size ((,class (:foreground ,base01 :weight thin)))) + `(consult-notes-name ((,class (:foreground ,base01)))) + `(consult-notes-time ((,class (:foreground ,base01)))) + `(consult-notes-size ((,class (:foreground ,base01)))) `(denote-faces-keywords ((,class (:foreground ,cyan)))) `(mode-line ((,class (:foreground ,base0 :background ,base02)))) `(mode-line-inactive ((,class (:foreground ,base01 :background ,base03))))