commit a0275d064399a15c8af85bb4515ab8fb800cea5b
parent 9d4c4f95f7561d72d6baf4518b8a5dbe29751b0d
Author: andsy10 <andsy1016@gmail.com>
Date: Sat, 26 Sep 2026 13:17:45 +0800
Cleanup configuration
Diffstat:
14 files changed, 79 insertions(+), 101 deletions(-)
diff --git a/early-init.el b/early-init.el
@@ -23,6 +23,4 @@
(menu-bar-mode -1)
(prefer-coding-system 'utf-8)
-
-(setq frame-background-mode 'dark)
;;; early-init.el ends here
diff --git a/lisp/init-base.el b/lisp/init-base.el
@@ -269,6 +269,11 @@
:config
(setq eww-auto-rename-buffer t))
+(use-package shr
+ :straight nil
+ :config
+ (setq shr-use-fonts nil))
+
;; tramp
(use-package tramp
:straight nil
diff --git a/lisp/init-completion.el b/lisp/init-completion.el
@@ -34,19 +34,6 @@
(when-let* ((proj (project-current t)))
(consult-git-grep (project-root proj))))
- (defun consult-colors-emacs (color)
- "Show a list of all supported colors for a particular frame.
-
-You can insert the name (default), or insert or kill the hexadecimal or RGB
-value of the selected COLOR."
- (interactive
- (list (consult--read (list-colors-duplicates (defined-colors))
- :prompt "Emacs color: "
- :require-match t
- :category 'color
- :history '(:input consult-colors-history))))
- (insert color))
-
(defun consult-directory-externally (file)
"Open FILE externally using the default application of the system."
(interactive "fOpen externally: ")
@@ -100,6 +87,8 @@ value of the selected COLOR."
xref-show-xrefs-function #'consult-xref)
;; register
+ (delete 'consult-source-buffer-register consult-buffer-sources)
+ (delete 'consult-source-file-register consult-buffer-sources)
(setq register-preview-delay 0.5
register-preview-function #'consult-register-format)
(advice-add #'register-preview :override #'consult-register-window)
@@ -139,10 +128,6 @@ value of the selected COLOR."
"*Async-native-compile-log*")
:test 'equal)))
-(use-package facemenu
- :straight nil
- :autoload list-colors-duplicates)
-
;; right-click
(use-package embark
:commands
diff --git a/lisp/init-dired.el b/lisp/init-dired.el
@@ -18,7 +18,6 @@
dired-recursive-copies 'always
dired-mouse-drag-files t
mouse-drag-and-drop-region-cross-program t
- dired-compress-file-default-suffix ".zip"
dired-kill-when-opening-new-dired-buffer nil
dired-auto-revert-buffer t
dired-create-destination-dirs 'ask
@@ -71,6 +70,7 @@ the hardcoded fallback recipe."
("p" "~/Pictures/" "Pictures")
("d" "~/Downloads/" "Download")
("v" "~/Movies/" "Videos")
+ ("m" "~/Music/" "Music")
("n" "~/org/my-org-note/" "Notes")
("g" "~/gptel/" "gptel sessions")))
@@ -103,8 +103,8 @@ the hardcoded fallback recipe."
(lambda ()
(format "Gitignore filter (%s)"
(if dired-gitignore--global-mode-active
- (propertize "+" 'face 'transient-value)
- (propertize "-" 'face 'transient-inactive-value))))
+ (propertize "+" 'face 'transient-argument)
+ (propertize "-" 'face 'transient-inactive-argument))))
:transient t
(interactive)
(dired-gitignore-global-mode))
diff --git a/lisp/init-gptel.el b/lisp/init-gptel.el
@@ -147,10 +147,6 @@ explanations, no quotes, no punctuation, no file extension."
;; pi
(use-package pilish
:autoload my-pilish
- :straight (pilish
- :type git
- :host github
- :repo "dnouri/pilish")
:config
(defun my-pilish ()
"Run `pilish' in project root."
diff --git a/lisp/init-kbd-func.el b/lisp/init-kbd-func.el
@@ -71,7 +71,7 @@ there's a region, all lines that region covers will be duplicated."
(interactive "P")
(let ((time (format-time-string "%Y-%m-%d %H:%M UTC" nil t)))
(if arg
- (progn (kill-new time) (message "Save '%s' to kill ring." time))
+ (progn (kill-new time) (message "Save `%s' to kill ring." time))
(message time))))
(defun my-straight-packages-count ()
diff --git a/lisp/init-kbd.el b/lisp/init-kbd.el
@@ -48,7 +48,6 @@
"l" #'global-tab-line-mode
"d" #'disable-theme
"t" #'consult-theme
- "c" #'consult-colors-emacs
"f" #'describe-face
"k" #'keycast-header-line-mode
"w" #'global-whitespace-mode)
diff --git a/lisp/init-org.el b/lisp/init-org.el
@@ -93,6 +93,7 @@
(use-package phscroll
:hook
(org-mode . org-phscroll-activate)
+ (markdown-mode . phscroll-mode)
:init
(setq org-startup-truncated nil))
diff --git a/lisp/init-package.el b/lisp/init-package.el
@@ -60,7 +60,8 @@ Like normal Emacs `C-k'. Kill to end of line and put content in kill-ring."
;; eshell-syntax-highlighting
(use-package eshell-syntax-highlighting
:hook
- (eshell-mode . eshell-syntax-highlighting-global-mode))
+ (eshell-mode . eshell-syntax-highlighting-global-mode)
+ (eshell-mode . (lambda () (setenv "TERM" "xterm-256color"))))
;; workspace
(use-package perspective
@@ -168,7 +169,7 @@ against its previous revision."
(message "Not a vc annotate buffer")
(let* ((file (cadr vc-buffer-overriding-fileset))
(rev vc-buffer-revision))
- (vc-print-log-internal vc-annotate-backend file rev t 1)))))
+ (vc-print-log-internal vc-annotate-backend file rev t 1)))))
(use-package consult-vc
:straight
diff --git a/lisp/init-prog.el b/lisp/init-prog.el
@@ -133,13 +133,6 @@
(use-package edit-indirect)
-;; html
-(use-package shr
- :straight nil
- :config
- (setq shr-inhibit-images nil
- shr-use-fonts nil))
-
;; caddy
(use-package caddyfile-mode
:mode
diff --git a/lisp/init-terminal.el b/lisp/init-terminal.el
@@ -129,69 +129,65 @@
(setq isearch-lazy-count t)
;; theme
-(if (>= (display-color-cells) 16777216)
- (progn
- (defvar my-base03 "#062624")
- (defvar my-base02 "#0c2b29")
- (defvar my-base01 "#4d6967")
- (defvar my-base00 "#728e8c")
- (defvar my-base1 "#7f9b99")
- (defvar my-cyan "#01928d")
- (defvar my-blue "#2570cd")
- (defvar my-green "#3a9c36")
- (defvar my-magenta "#d33682")
- (defvar my-yellow "#a87c04")
- (defvar my-orange "#c24713")
- (defvar my-red "#ce2825")
-
- (custom-set-faces
- `(default ((t (:foreground ,my-base00 :background ,my-base03))))
- `(cursor ((t (:inverse t))))
- `(region ((t (:extend t :foreground ,my-base03 :background ,my-base00))))
- `(shadow ((t (:foreground ,my-base01))))
- `(error ((t (:foreground ,my-orange))))
- `(warning ((t (:foreground ,my-yellow))))
- `(font-lock-builtin-face ((t (:foreground ,my-base00 :weight bold :slant normal))))
- `(font-lock-comment-face ((t (:foreground ,my-base01))))
- `(font-lock-keyword-face ((t (:foreground ,my-cyan :weight bold))))
- `(font-lock-variable-name-face ((t (:foreground ,my-blue))))
- `(font-lock-constant-face ((t (:foreground ,my-blue :weight bold))))
- `(font-lock-string-face ((t (:foreground ,my-green))))
- `(font-lock-type-face ((t (:foreground ,my-yellow))))
- `(font-lock-function-name-face ((t (:foreground ,my-blue))))
- `(hl-line ((t (:background ,my-base02 :extend t))))
- `(show-paren-match ((t (:foreground ,my-magenta :weight bold))))
- `(show-paren-mismatch ((t (:foreground ,my-base03 :background ,my-red))))
- `(icomplete-first-match ((t (:foreground ,my-yellow :weight bold))))
- `(completions-common-part ((t (:foreground ,my-blue))))
- `(minibuffer-prompt ((t (:foreground ,my-base01 :weight bold))))
- `(line-number ((t (:foreground ,my-base01 :weight extra-light))))
- `(button ((t (:foreground ,my-base00 :underline t))))
- `(mode-line ((t (:background ,my-base00 :foreground ,my-base03))))
- `(mode-line-inactive ((t (:background ,my-base02 :foreground ,my-base00))))
- `(dired-header ((t (:foreground ,my-green))))
- `(dired-directory ((t (:foreground ,my-blue))))
- `(dired-ignored ((t (:foreground ,my-base01))))
- `(isearch ((t (:background ,my-magenta :foreground ,my-base03))))
- `(lazy-highlight ((t (:background ,my-yellow :foreground ,my-base03))))
- `(isearch-fail ((t (:foreground ,my-red))))
- `(org-block ((t (:inherit default))))
- `(org-document-title ((t (:inherit default :weight bold))))
- `(org-document-info ((t (:inherit org-document-title))))
- `(eshell-prompt ((t (:foreground ,my-yellow :weight bold))))
- `(diff-header ((t (:foreground ,my-base00 :background ,my-base02))))
- `(diff-file-header ((t (:inherit: diff-header :weight bold))))
- `(diff-hunk-header ((t (:foreground "#c1a059" :background "#253224"))))
- `(diff-added ((t (:foreground "#73b971" :background "#103628"))))
- `(diff-refine-added ((t (:foreground "#8cc78d" :background "#1d522e"))))
- `(diff-removed ((t (:foreground "#e17360" :background "#2d2c25"))))
- `(diff-refine-removed ((t (:foreground "#e7917f" :background "#5c3225"))))
- `(xref-file-header ((t (:foreground ,my-base01))))
- `(xref-line-number ((t (:foreground ,my-green))))
- `(match ((t (:foreground ,my-base1 :background ,my-base02 :weight bold))))))
-
- (progn
- (global-hl-line-mode -1)))
+(when (>= (display-color-cells) 16777216)
+ (defvar my-base03 "#062624")
+ (defvar my-base02 "#0c2b29")
+ (defvar my-base01 "#4d6967")
+ (defvar my-base00 "#728e8c")
+ (defvar my-base1 "#7f9b99")
+ (defvar my-cyan "#01928d")
+ (defvar my-blue "#2570cd")
+ (defvar my-green "#3a9c36")
+ (defvar my-magenta "#d33682")
+ (defvar my-yellow "#a87c04")
+ (defvar my-orange "#c24713")
+ (defvar my-red "#ce2825")
+
+ (custom-set-faces
+ `(default ((t (:foreground ,my-base00 :background ,my-base03))))
+ `(cursor ((t (:inverse t))))
+ `(region ((t (:extend t :foreground ,my-base03 :background ,my-base00))))
+ `(shadow ((t (:foreground ,my-base01))))
+ `(error ((t (:foreground ,my-orange))))
+ `(warning ((t (:foreground ,my-yellow))))
+ `(font-lock-builtin-face ((t (:foreground ,my-base00 :weight bold :slant normal))))
+ `(font-lock-comment-face ((t (:foreground ,my-base01))))
+ `(font-lock-keyword-face ((t (:foreground ,my-cyan :weight bold))))
+ `(font-lock-variable-name-face ((t (:foreground ,my-blue))))
+ `(font-lock-constant-face ((t (:foreground ,my-blue :weight bold))))
+ `(font-lock-string-face ((t (:foreground ,my-green))))
+ `(font-lock-type-face ((t (:foreground ,my-yellow))))
+ `(font-lock-function-name-face ((t (:foreground ,my-blue))))
+ `(hl-line ((t (:background ,my-base02 :extend t))))
+ `(show-paren-match ((t (:foreground ,my-magenta :weight bold))))
+ `(show-paren-mismatch ((t (:foreground ,my-base03 :background ,my-red))))
+ `(icomplete-first-match ((t (:foreground ,my-yellow :weight bold))))
+ `(completions-common-part ((t (:foreground ,my-blue))))
+ `(minibuffer-prompt ((t (:foreground ,my-base01 :weight bold))))
+ `(line-number ((t (:foreground ,my-base01 :weight extra-light))))
+ `(button ((t (:foreground ,my-base00 :underline t))))
+ `(mode-line ((t (:background ,my-base00 :foreground ,my-base03))))
+ `(mode-line-inactive ((t (:background ,my-base02 :foreground ,my-base00))))
+ `(dired-header ((t (:foreground ,my-green))))
+ `(dired-directory ((t (:foreground ,my-blue))))
+ `(dired-ignored ((t (:foreground ,my-base01))))
+ `(isearch ((t (:background ,my-magenta :foreground ,my-base03))))
+ `(lazy-highlight ((t (:background ,my-yellow :foreground ,my-base03))))
+ `(isearch-fail ((t (:foreground ,my-red))))
+ `(org-block ((t (:inherit default))))
+ `(org-document-title ((t (:inherit default :weight bold))))
+ `(org-document-info ((t (:inherit org-document-title))))
+ `(eshell-prompt ((t (:foreground ,my-yellow :weight bold))))
+ `(diff-header ((t (:foreground ,my-base00 :background ,my-base02))))
+ `(diff-file-header ((t (:inherit: diff-header :weight bold))))
+ `(diff-hunk-header ((t (:foreground "#c1a059" :background "#253224"))))
+ `(diff-added ((t (:foreground "#73b971" :background "#103628"))))
+ `(diff-refine-added ((t (:foreground "#8cc78d" :background "#1d522e"))))
+ `(diff-removed ((t (:foreground "#e17360" :background "#2d2c25"))))
+ `(diff-refine-removed ((t (:foreground "#e7917f" :background "#5c3225"))))
+ `(xref-file-header ((t (:foreground ,my-base01))))
+ `(xref-line-number ((t (:foreground ,my-green))))
+ `(match ((t (:foreground ,my-base1 :background ,my-base02 :weight bold))))))
(defun open-init-file()
"Open user's init.el file."
diff --git a/lisp/init-ui.el b/lisp/init-ui.el
@@ -15,7 +15,7 @@
:straight
(solarized-emacs
:fork
- (:type git :host nil :repo "https://git.trogloxene.org/solarized-emacs.git"))
+ (:type git :repo "https://git.trogloxene.org/solarized-emacs.git"))
:init
(if (and (daemonp) (not *is-android*))
(add-hook 'after-make-frame-functions
diff --git a/lisp/my-dark-theme.el b/lisp/my-dark-theme.el
@@ -118,6 +118,8 @@
`(transient-key-stack ((,class (:foreground ,magenta :inherit transient-key))))
`(transient-key-recurse ((,class (:foreground ,blue :inherit transient-key))))
`(transient-key-noop ((,class (:foreground ,base01 :inherit transient-key))))
+ `(transient-value ((,class (:foreground ,green))))
+ `(transient-argument ((,class (:foreground ,green :inherit transient-key))))
`(geiser-font-lock-repl-output ((,class (:foreground ,green))))
`(geiser-font-lock-doc-link ((,class (:foreground ,blue :underline t))))
diff --git a/lisp/my-light-theme.el b/lisp/my-light-theme.el
@@ -118,6 +118,8 @@
`(transient-key-stack ((,class (:foreground ,magenta :inherit transient-key))))
`(transient-key-recurse ((,class (:foreground ,blue :inherit transient-key))))
`(transient-key-noop ((,class (:foreground ,base01 :inherit transient-key))))
+ `(transient-value ((,class (:foreground ,green))))
+ `(transient-argument ((,class (:foreground ,green :inherit transient-key))))
`(geiser-font-lock-repl-output ((,class (:foreground ,green))))
`(geiser-font-lock-doc-link ((,class (:foreground ,blue :underline t))))