about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el65
-rw-r--r--lisp/+avy.el2
-rw-r--r--lisp/+modeline.el12
-rw-r--r--lisp/+tab-bar.el16
-rw-r--r--machines/bob.el2
5 files changed, 56 insertions, 41 deletions
diff --git a/init.el b/init.el index 083678a..9bd342b 100644 --- a/init.el +++ b/init.el
@@ -51,7 +51,8 @@
51 "C-w" #'+kill-word-backward-or-region 51 "C-w" #'+kill-word-backward-or-region
52 "C-x C-m" #'execute-extended-command ; original: coding systems 52 "C-x C-m" #'execute-extended-command ; original: coding systems
53 "C-<backspace>" #'+backward-kill-word 53 "C-<backspace>" #'+backward-kill-word
54 "C-x TAB" #'+indent-rigidly) 54 "C-x TAB" #'+indent-rigidly
55 "C-x C-c" nil)
55 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults 56 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults
56 (global-set-key (kbd "C-h") 'delete-backward-char) 57 (global-set-key (kbd "C-h") 'delete-backward-char)
57 (keyboard-translate ?\C-h ?\C-?) 58 (keyboard-translate ?\C-h ?\C-?)
@@ -592,7 +593,7 @@
592 (cons " --- " frame-title-format)) 593 (cons " --- " frame-title-format))
593 org-clock-string-limit 7 ; just the clock bit 594 org-clock-string-limit 7 ; just the clock bit
594 ;; org-clock-string-limit 25 ; gives enough information 595 ;; org-clock-string-limit 25 ; gives enough information
595 org-clock-persist t 596 org-clock-persist nil
596 org-confirm-babel-evaluate nil 597 org-confirm-babel-evaluate nil
597 org-cycle-separator-lines 0 598 org-cycle-separator-lines 0
598 org-directory (sync/ "org/" t) 599 org-directory (sync/ "org/" t)
@@ -857,7 +858,7 @@
857(setup scratch 858(setup scratch
858 (:require +scratch) 859 (:require +scratch)
859 (:option initial-major-mode #'lisp-interaction-mode 860 (:option initial-major-mode #'lisp-interaction-mode
860 initial-scratch-message (+scratch-fortune)) 861 initial-scratch-message ";;; What good will you work in the world today?\n\n")
861 (:+leader "." #'+scratch-switch-to-scratch 862 (:+leader "." #'+scratch-switch-to-scratch
862 "C-." #'+scratch-switch-to-scratch 863 "C-." #'+scratch-switch-to-scratch
863 "," #'+scratch-switch-to-text 864 "," #'+scratch-switch-to-text
@@ -912,7 +913,8 @@
912 +tab-bar-tracking-mode 913 +tab-bar-tracking-mode
913 +tab-bar-notmuch-count 914 +tab-bar-notmuch-count
914 +tab-bar-timer 915 +tab-bar-timer
915 +tab-bar-date)) 916 +tab-bar-date
917 +tab-bar-space))
916 (tab-bar-mode +1) 918 (tab-bar-mode +1)
917 (display-time-mode +1)) 919 (display-time-mode +1))
918 920
@@ -936,6 +938,8 @@
936(setup whitespace 938(setup whitespace
937 (:option whitespace-line-column nil 939 (:option whitespace-line-column nil
938 whitespace-style '(face trailing tabs tab-mark)) 940 whitespace-style '(face trailing tabs tab-mark))
941 ;; I want trailing whitespace to be cleaned up, but I don't need to know about it.
942 (:face 'whitespace-trailing '((t :inherit nil)))
939 (:hook-into text-mode prog-mode)) 943 (:hook-into text-mode prog-mode))
940 944
941(setup (:straight 0x0) 945(setup (:straight 0x0)
@@ -1003,9 +1007,8 @@
1003 (:+key "M-j" #'avy-goto-char-timer) 1007 (:+key "M-j" #'avy-goto-char-timer)
1004 (:bind-into isearch 1008 (:bind-into isearch
1005 "M-j" #'avy-isearch) 1009 "M-j" #'avy-isearch)
1006 (:when-loaded 1010 (setf (alist-get ?. avy-dispatch-alist) #'avy-action-embark)
1007 (setf (alist-get ?. avy-dispatch-alist) #'avy-action-embark) 1011 (+avy-buffer-face-mode +1))
1008 (+avy-buffer-face-mode +1)))
1009 1012
1010(setup (:straight bbdb) 1013(setup (:straight bbdb)
1011 (:straight bbdb-vcard) 1014 (:straight bbdb-vcard)
@@ -1248,7 +1251,7 @@
1248 #'enable-lui-track 1251 #'enable-lui-track
1249 #'visual-fill-column-mode 1252 #'visual-fill-column-mode
1250 #'enable-lui-autopaste 1253 #'enable-lui-autopaste
1251 ) 1254 (defun turn-off-electric-pair-mode () (electric-pair-mode -1)))
1252 (:local-set fringes-outside-margins t 1255 (:local-set fringes-outside-margins t
1253 right-margin-width (length lui-time-stamp-format) 1256 right-margin-width (length lui-time-stamp-format)
1254 scroll-margin 0 1257 scroll-margin 0
@@ -1303,7 +1306,8 @@
1303 xref-show-xrefs-function #'consult-xref 1306 xref-show-xrefs-function #'consult-xref
1304 xref-show-definitions-function #'consult-xref 1307 xref-show-definitions-function #'consult-xref
1305 tab-always-indent 'complete 1308 tab-always-indent 'complete
1306 completion-in-region-function #'consult-completion-in-region) 1309 ;; completion-in-region-function #'consult-completion-in-region
1310 )
1307 (advice-add #'register-preview :override #'consult-register-window) 1311 (advice-add #'register-preview :override #'consult-register-window)
1308 (dolist (binding '(;; C-c bindings (mode-specific-map) 1312 (dolist (binding '(;; C-c bindings (mode-specific-map)
1309 ("C-c h" . consult-history) 1313 ("C-c h" . consult-history)
@@ -1412,10 +1416,8 @@
1412 (setf (alist-get 'consult-notmuch vertico-multiform-commands) nil 1416 (setf (alist-get 'consult-notmuch vertico-multiform-commands) nil
1413 (alist-get 'consult-notmuch-tree vertico-multiform-commands) nil))) 1417 (alist-get 'consult-notmuch-tree vertico-multiform-commands) nil)))
1414 1418
1415(setup (:straight corfu 1419(setup (:straight corfu)
1416 :quit "Turns out, I actually like minibuffer completion better.") 1420 (corfu-global-mode +1))
1417 (+with-ensure-after-init
1418 (corfu-global-mode +1)))
1419 1421
1420(setup (:straight crossword) 1422(setup (:straight crossword)
1421 ;; This isn't the perfect Emacs crossword puzzle, but it's the only one I 1423 ;; This isn't the perfect Emacs crossword puzzle, but it's the only one I
@@ -2050,10 +2052,6 @@
2050 (defun +modus-themes-mostly-monochrome () 2052 (defun +modus-themes-mostly-monochrome ()
2051 "Set up mdous-themes to be mostly monochrome." 2053 "Set up mdous-themes to be mostly monochrome."
2052 ;; Major mode in the mode-line 2054 ;; Major mode in the mode-line
2053 (defface +modeline-text-mode-face nil
2054 "Text-mode major mode face.")
2055 (defface +modeline-prog-mode-face nil
2056 "Prog-mode major mode face.")
2057 (modus-themes-with-colors 2055 (modus-themes-with-colors
2058 (custom-set-faces 2056 (custom-set-faces
2059 `(font-lock-builtin-face 2057 `(font-lock-builtin-face
@@ -2063,7 +2061,8 @@
2063 ((,class :inherit variable-pitch 2061 ((,class :inherit variable-pitch
2064 :foreground ,fg-comment-yellow))) 2062 :foreground ,fg-comment-yellow)))
2065 `(font-lock-comment-delimiter-face 2063 `(font-lock-comment-delimiter-face
2066 ((,class :inherit font-lock-comment-face))) 2064 ((,class :inherit fixed-pitch
2065 :foreground ,fg-comment-yellow)))
2067 `(font-lock-constant-face 2066 `(font-lock-constant-face
2068 ((,class :inherit underline 2067 ((,class :inherit underline
2069 :foreground unspecified))) 2068 :foreground unspecified)))
@@ -2099,16 +2098,12 @@
2099 ((,class :inherit font-lock-comment-face 2098 ((,class :inherit font-lock-comment-face
2100 :foreground ,fg-header 2099 :foreground ,fg-header
2101 :background ,yellow-intense-bg))) 2100 :background ,yellow-intense-bg)))
2102 `(+modeline-text-mode-face 2101 `(mode-line
2103 ((,class :foreground ,blue 2102 ((,class :height 100)))
2104 :inherit modus-themes-bold))) 2103 `(mode-line-inactive
2105 `(+modeline-prog-mode-face 2104 ((,class :height 100)))
2106 ((,class :foreground ,magenta 2105 `(tab-bar
2107 :inherit modus-themes-bold)))) 2106 ((,class :height 100)))))))
2108 (:option +modeline-major-mode-faces
2109 `((text-mode . +modeline-text-mode-face)
2110 (prog-mode . +modeline-prog-mode-face)
2111 (t . bold))))))
2112 2107
2113 (require 'dawn) 2108 (require 'dawn)
2114 (dawn-schedule #'modus-themes-load-operandi 2109 (dawn-schedule #'modus-themes-load-operandi
@@ -2344,16 +2339,17 @@
2344 +modeline-ace-window-display 2339 +modeline-ace-window-display
2345 +modeline-modified 2340 +modeline-modified
2346 +modeline-buffer-name 2341 +modeline-buffer-name
2342 +modeline-major-mode
2347 (lambda () (+modeline-vc " : ")) 2343 (lambda () (+modeline-vc " : "))
2348 +modeline-anzu 2344 +modeline-anzu
2349 ) 2345 )
2350 ( ; right 2346 ( ; right
2347 simple-modeline-segment-process
2351 (lambda () 2348 (lambda ()
2352 (unless +tab-bar-misc-info-mode 2349 (unless +tab-bar-misc-info-mode
2353 (+modeline-concat 2350 (+modeline-concat
2354 '(+modeline-track 2351 '(+modeline-track
2355 simple-modeline-segment-misc-info)))) 2352 simple-modeline-segment-misc-info))))
2356 +modeline-position
2357 simple-modeline-segment-process 2353 simple-modeline-segment-process
2358 ,(+modeline-concat 2354 ,(+modeline-concat
2359 '(+modeline-god-mode 2355 '(+modeline-god-mode
@@ -2363,8 +2359,9 @@
2363 +modeline-text-scale 2359 +modeline-text-scale
2364 +modeline-input-method) 2360 +modeline-input-method)
2365 " ") 2361 " ")
2366 +modeline-major-mode 2362 +modeline-position
2367 +modeline-spacer))) 2363 ;; +modeline-spacer
2364 )))
2368 (simple-modeline-mode +1)) 2365 (simple-modeline-mode +1))
2369 2366
2370(setup (:straight slack) 2367(setup (:straight slack)
@@ -2409,7 +2406,6 @@
2409 #'describe-gnu-project 2406 #'describe-gnu-project
2410 #'suspend-frame) 2407 #'suspend-frame)
2411 (sophomore-disable-with 'confirm 2408 (sophomore-disable-with 'confirm
2412 #'+save-buffers-quit
2413 #'save-buffers-kill-terminal) 2409 #'save-buffers-kill-terminal)
2414 (sophomore-mode +1)) 2410 (sophomore-mode +1))
2415 2411
@@ -2484,6 +2480,11 @@
2484 trashed-use-header-line t 2480 trashed-use-header-line t
2485 trashed-size-format 'human-readable)) 2481 trashed-size-format 'human-readable))
2486 2482
2483(setup (:straight (twtxt
2484 :fork (:repo "duckwork/twtxt-el")))
2485 (:option twtxt-file "/sshx:hetzner:/var/www/acdw.casa/tw.txt"
2486 twtxt-following '(("acdw" "https://acdw.casa/tw.txt"))))
2487
2487(setup (:straight undo-fu) 2488(setup (:straight undo-fu)
2488 (:option undo-fu-allow-undo-in-region t) 2489 (:option undo-fu-allow-undo-in-region t)
2489 (:global "C-/" #'undo-fu-only-undo 2490 (:global "C-/" #'undo-fu-only-undo
diff --git a/lisp/+avy.el b/lisp/+avy.el index 0606405..8056f00 100644 --- a/lisp/+avy.el +++ b/lisp/+avy.el
@@ -62,7 +62,7 @@
62 (setq buffer-face-mode-face +avy-buffer-face-mode-face) 62 (setq buffer-face-mode-face +avy-buffer-face-mode-face)
63 (buffer-face-mode +1))) 63 (buffer-face-mode +1)))
64 64
65(define-minor-mode +avy-buffer-face-local-mode 65(define-minor-mode +avy-buffer-face-mode
66 "Turn off `buffer-face-mode' before doing Avy selections. 66 "Turn off `buffer-face-mode' before doing Avy selections.
67Restore the mode after the selection." 67Restore the mode after the selection."
68 :lighter "" 68 :lighter ""
diff --git a/lisp/+modeline.el b/lisp/+modeline.el index 2c9bbee..33d34c3 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el
@@ -138,6 +138,9 @@ in the cdr will be applied to the major-mode in the mode line."
138 :type '(alist :key-type function 138 :type '(alist :key-type function
139 :value-type face)) 139 :value-type face))
140 140
141(defface +modeline-major-mode-face nil
142 "Face for modeline major-mode.")
143
141(defun +modeline-major-mode (&optional spacer) 144(defun +modeline-major-mode (&optional spacer)
142 "Display the current `major-mode'." 145 "Display the current `major-mode'."
143 (+modeline-spacer nil spacer 146 (+modeline-spacer nil spacer
@@ -149,10 +152,11 @@ in the cdr will be applied to the major-mode in the mode line."
149 ;; simply detect which mode it's in when I change major 152 ;; simply detect which mode it's in when I change major
150 ;; modes (`change-major-mode-hook') and change the face 153 ;; modes (`change-major-mode-hook') and change the face
151 ;; there, probably. 154 ;; there, probably.
152 (catch :done (dolist (cel +modeline-major-mode-faces) 155 ;; (catch :done (dolist (cel +modeline-major-mode-faces)
153 (when (derived-mode-p (car cel)) 156 ;; (when (derived-mode-p (car cel))
154 (throw :done (cdr cel)))) 157 ;; (throw :done (cdr cel))))
155 (alist-get t +modeline-major-mode-faces))) 158 ;; (alist-get t +modeline-major-mode-faces))
159 '+modeline-major-mode-face)
156 'keymap (let ((map (make-sparse-keymap))) 160 'keymap (let ((map (make-sparse-keymap)))
157 (bindings--define-key map [mode-line down-mouse-1] 161 (bindings--define-key map [mode-line down-mouse-1]
158 `(menu-item "Menu Bar" ignore 162 `(menu-item "Menu Bar" ignore
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index 95f657d..e9daaf4 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el
@@ -17,6 +17,10 @@
17 17
18;; Common 18;; Common
19 19
20(defun +tab-bar-space (&optional n)
21 "Display a space N characters long, or 1."
22 `((space menu-item ,(+string-repeat (or n 1) " ") ignore)))
23
20(defun +tab-bar-misc-info () 24(defun +tab-bar-misc-info ()
21 "Display `mode-line-misc-info', formatted for the tab-bar." 25 "Display `mode-line-misc-info', formatted for the tab-bar."
22 `((misc-info menu-item ,(string-trim-right 26 `((misc-info menu-item ,(string-trim-right
@@ -66,7 +70,7 @@
66 "Display `display-time-string' in the tab-bar." 70 "Display `display-time-string' in the tab-bar."
67 (when display-time-mode 71 (when display-time-mode
68 `((date-time-string menu-item 72 `((date-time-string menu-item
69 ,(propertize (concat " " display-time-string)) 73 ,(substring-no-properties (concat " " (string-trim display-time-string)))
70 (lambda (ev) 74 (lambda (ev)
71 (interactive "e") 75 (interactive "e")
72 (popup-menu 76 (popup-menu
@@ -257,8 +261,14 @@ name to the left."
257 (require 'shr) ; `shr-string-pixel-width' 261 (require 'shr) ; `shr-string-pixel-width'
258 (let* ((rest (cdr (memq '+tab-bar-format-align-right tab-bar-format))) 262 (let* ((rest (cdr (memq '+tab-bar-format-align-right tab-bar-format)))
259 (rest (tab-bar-format-list rest)) 263 (rest (tab-bar-format-list rest))
260 (rest (mapconcat (lambda (item) (nth 2 item)) rest "")) 264 (rest (mapconcat (lambda (item) x(nth 2 item)) rest ""))
261 (hpos (shr-string-pixel-width rest)) 265 (hpos
266 ;; I have to rewrite `shr-string-pixel-width' to take the tab-bar face
267 ;; into account.
268 (let ((pt (point)))
269 (prog1 (with-temp-buffer (insert (propertize rest 'face 'tab-bar))
270 (shr-pixel-column))
271 (goto-char pt))))
262 (str (propertize " " 'display `(space :align-to (- right (,hpos)))))) 272 (str (propertize " " 'display `(space :align-to (- right (,hpos))))))
263 `((align-right menu-item ,str ignore)))) 273 `((align-right menu-item ,str ignore))))
264 274
diff --git a/machines/bob.el b/machines/bob.el index a754c2d..e043719 100644 --- a/machines/bob.el +++ b/machines/bob.el
@@ -9,7 +9,7 @@
9 9
10(defun +bob-set-faces (&rest _) 10(defun +bob-set-faces (&rest _)
11 (let ((base-face "IBM Plex Mono") 11 (let ((base-face "IBM Plex Mono")
12 (base-size 105) 12 (base-size 110)
13 (italic-face nil) 13 (italic-face nil)
14 ;; (bold-face nil) 14 ;; (bold-face nil)
15 (mono-face nil) 15 (mono-face nil)