summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el130
-rw-r--r--lisp/+elfeed.el14
-rw-r--r--lisp/+emacs.el2
-rw-r--r--lisp/+modeline.el9
-rw-r--r--lisp/+setup.el21
-rw-r--r--lisp/+tab-bar.el13
-rw-r--r--lisp/acdw.el7
-rw-r--r--machines/bob.el2
8 files changed, 83 insertions, 115 deletions
diff --git a/init.el b/init.el index 9bd342b..2932768 100644 --- a/init.el +++ b/init.el
@@ -38,7 +38,8 @@
38 ;; good functioning. In this block, I add extra things or more "experimental" 38 ;; good functioning. In this block, I add extra things or more "experimental"
39 ;; ones that might not belong in a separate file. 39 ;; ones that might not belong in a separate file.
40 (:also-load +lisp) 40 (:also-load +lisp)
41 (:option truncate-string-ellipsis "…") 41 (:option truncate-string-ellipsis "…"
42 ring-bell-function 'ignore)
42 ;; Bindings 43 ;; Bindings
43 (:global "C-x C-k" #'kill-current-buffer 44 (:global "C-x C-k" #'kill-current-buffer
44 "C-x 4 n" #'clone-buffer 45 "C-x 4 n" #'clone-buffer
@@ -52,7 +53,7 @@
52 "C-x C-m" #'execute-extended-command ; original: coding systems 53 "C-x C-m" #'execute-extended-command ; original: coding systems
53 "C-<backspace>" #'+backward-kill-word 54 "C-<backspace>" #'+backward-kill-word
54 "C-x TAB" #'+indent-rigidly 55 "C-x TAB" #'+indent-rigidly
55 "C-x C-c" nil) 56 "C-x C-c" #'+save-buffers-quit)
56 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults 57 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults
57 (global-set-key (kbd "C-h") 'delete-backward-char) 58 (global-set-key (kbd "C-h") 'delete-backward-char)
58 (keyboard-translate ?\C-h ?\C-?) 59 (keyboard-translate ?\C-h ?\C-?)
@@ -105,8 +106,8 @@
105 (dolist (var '(safe-local-variable-values 106 (dolist (var '(safe-local-variable-values
106 warning-suppress-types)) 107 warning-suppress-types))
107 (add-to-list '+custom-variable-allowlist var)) 108 (add-to-list '+custom-variable-allowlist var))
108 (+ensure-after-init 109 (+with-ensure-after-init
109 (+custom-load-ignoring-most-customizations)) 110 (+custom-load-ignoring-most-customizations))
110 (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets) 111 (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets)
111 (:with-mode Custom-mode 112 (:with-mode Custom-mode
112 (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression))) 113 (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression)))
@@ -147,7 +148,7 @@
147 (+ensure-after-init #'+key-global-mode)) 148 (+ensure-after-init #'+key-global-mode))
148 149
149(setup _work 150(setup _work
150 (+with-ensure-after-init 151 (with-eval-after-load 'bbdb
151 (require '_work))) 152 (require '_work)))
152 153
153(setup abbrev 154(setup abbrev
@@ -672,12 +673,13 @@
672 (:global [f8] #'org-clock-in 673 (:global [f8] #'org-clock-in
673 [f9] #'org-clock-out 674 [f9] #'org-clock-out
674 "C-c l" #'org-store-link) 675 "C-c l" #'org-store-link)
675 (:hook #'variable-pitch-mode 676 (+with-ensure-after-init
677 (:hook #'variable-pitch-mode
676 #'visual-fill-column-mode 678 #'visual-fill-column-mode
677 #'turn-off-auto-fill 679 #'turn-off-auto-fill
678 #'org-indent-mode 680 #'org-indent-mode
679 #'prettify-symbols-mode 681 #'prettify-symbols-mode
680 #'+org-wrap-on-hyphens) 682 #'+org-wrap-on-hyphens))
681 (:local-set prettify-symbols-alist '(("DEADLINE:" . ?→) 683 (:local-set prettify-symbols-alist '(("DEADLINE:" . ?→)
682 ("SCHEDULED:" . ?↷) 684 ("SCHEDULED:" . ?↷)
683 ("CLOSED:" . ?✓)) 685 ("CLOSED:" . ?✓))
@@ -974,12 +976,10 @@
974 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _) 976 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _)
975 (setq input (orderless-pattern-compiler input)) 977 (setq input (orderless-pattern-compiler input))
976 (cons input (lambda (str) (orderless--highlight input str))))) 978 (cons input (lambda (str) (orderless--highlight input str)))))
977 (+with-eval-after-loads (affe vertico-multiform) 979 (+with-eval-after-loads (affe)
978 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _) 980 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _)
979 (setq input (orderless-pattern-compiler input)) 981 (setq input (orderless-pattern-compiler input))
980 (cons input (lambda (str) (orderless--highlight input str))))) 982 (cons input (lambda (str) (orderless--highlight input str)))))
981 (setf (alist-get 'affe-grep vertico-multiform-commands) nil
982 (alist-get 'affe-find vertico-multiform-commands) nil)
983 (:+key "M-s g" #'affe-grep 983 (:+key "M-s g" #'affe-grep
984 "M-s f" #'affe-find))) 984 "M-s f" #'affe-find)))
985 985
@@ -1262,10 +1262,7 @@
1262 column-number-mode nil 1262 column-number-mode nil
1263 file-percentage-mode nil 1263 file-percentage-mode nil
1264 visual-fill-column-extra-text-width 1264 visual-fill-column-extra-text-width
1265 (cons +circe-left-margin 0)) 1265 (cons +circe-left-margin 0)))
1266 (with-eval-after-load 'vertico-multiform
1267 (setf (alist-get 'lui-next-button-or-complete vertico-multiform-commands)
1268 '(flat))))
1269 1266
1270 (tracking-mode +1) 1267 (tracking-mode +1)
1271 (:with-mode tracking-mode 1268 (:with-mode tracking-mode
@@ -1383,41 +1380,10 @@
1383 (comint-mode-map . comint-mode-hook) 1380 (comint-mode-map . comint-mode-hook)
1384 (sly-mrepl-mode-map . sly-mrepl-hook))) 1381 (sly-mrepl-mode-map . sly-mrepl-hook)))
1385 (with-eval-after-load 'orderless 1382 (with-eval-after-load 'orderless
1386 (:option consult--regexp-compiler #'consult--orderless-regexp-compiler)) 1383 (:option consult--regexp-compiler #'consult--orderless-regexp-compiler))))
1387 (with-eval-after-load 'vertico-multiform
1388 (setf (alist-get 'consult-buffer vertico-multiform-commands) '(flat))
1389 (dolist (buf-cmd '(consult-find
1390 consult-flymake
1391 consult-focus-lines
1392 consult-git-grep
1393 consult-grep
1394 consult-imenu
1395 consult-imenu-multi
1396 consult-keep-lines
1397 consult-line
1398 consult-line-multi
1399 consult-locate
1400 consult-multi-occur
1401 consult-outline
1402 consult-ripgrep
1403 consult-yank-pop))
1404 (setf (alist-get buf-cmd vertico-multiform-commands) nil)))))
1405
1406(setup (:straight consult-dir)
1407 (:load-after consult)
1408 (:+key "C-x C-d" #'consult-dir)
1409 (:with-map vertico-map
1410 (:bind "C-x C-d" #'consult-dir
1411 "C-x C-j" #'consult-dir-jump-file)))
1412
1413(setup (:straight consult-notmuch)
1414 (:load-after consult notmuch)
1415 (with-eval-after-load 'vertico-multiform
1416 (setf (alist-get 'consult-notmuch vertico-multiform-commands) nil
1417 (alist-get 'consult-notmuch-tree vertico-multiform-commands) nil)))
1418 1384
1419(setup (:straight corfu) 1385(setup (:straight corfu)
1420 (corfu-global-mode +1)) 1386 (global-corfu-mode +1))
1421 1387
1422(setup (:straight crossword) 1388(setup (:straight crossword)
1423 ;; This isn't the perfect Emacs crossword puzzle, but it's the only one I 1389 ;; This isn't the perfect Emacs crossword puzzle, but it's the only one I
@@ -1587,11 +1553,7 @@
1587 (:bind "C-." #'embark-act 1553 (:bind "C-." #'embark-act
1588 "M-." #'embark-dwim)) 1554 "M-." #'embark-dwim))
1589 (:with-map embark-file-map 1555 (:with-map embark-file-map
1590 (:bind "l" #'vlf)) 1556 (:bind "l" #'vlf)))
1591 ;; Integrations
1592 (with-eval-after-load 'vertico-multiform
1593 (setf (alist-get 'embark-prefix-help-command vertico-multiform-commands)
1594 nil)))
1595 1557
1596(setup (:straight embark-consult) 1558(setup (:straight embark-consult)
1597 (:load-after consult embark) 1559 (:load-after consult embark)
@@ -1687,9 +1649,7 @@
1687 (:option flyspell-correct--cr-key ";") 1649 (:option flyspell-correct--cr-key ";")
1688 (:bind-into flyspell 1650 (:bind-into flyspell
1689 "C-;" #'flyspell-correct-wrapper 1651 "C-;" #'flyspell-correct-wrapper
1690 "<f7>" #'+flyspell-correct-buffer) 1652 "<f7>" #'+flyspell-correct-buffer))
1691 (with-eval-after-load 'vertico-multiform
1692 (setf (alist-get 'flyspell vertico-multiform-categories) nil)))
1693 1653
1694(setup (:straight focus) 1654(setup (:straight focus)
1695 (:require) 1655 (:require)
@@ -1765,12 +1725,6 @@
1765 "<f1> v" #'helpful-variable 1725 "<f1> v" #'helpful-variable
1766 "<f1> k" #'helpful-key 1726 "<f1> k" #'helpful-key
1767 "<f1> ." #'helpful-at-point) 1727 "<f1> ." #'helpful-at-point)
1768 (with-eval-after-load 'vertico-multiform
1769 (dolist (cmd '(describe-symbol ; describe-* included here for completeness
1770 describe-function describe-variable
1771 helpful-function helpful-macro helpful-callable
1772 helpful-variable))
1773 (setf (alist-get cmd vertico-multiform-commands) nil)))
1774 ;; Load faster on first invocation by pre-loading a slow function 1728 ;; Load faster on first invocation by pre-loading a slow function
1775 ;; (see https://github.com/Wilfred/helpful/issues/236) 1729 ;; (see https://github.com/Wilfred/helpful/issues/236)
1776 (run-with-idle-timer 1 nil (lambda () 1730 (run-with-idle-timer 1 nil (lambda ()
@@ -1778,8 +1732,8 @@
1778 (info-lookup-setup-mode 'symbol 'emacs-lisp-mode)))) 1732 (info-lookup-setup-mode 'symbol 'emacs-lisp-mode))))
1779 1733
1780(setup (:straight (hippie-completing-read 1734(setup (:straight (hippie-completing-read
1781 :host github 1735 :host nil
1782 :repo "duckwork/hippie-completing-read")) 1736 :repo "https://codeberg.org/acdw/hippie-completing-read.el"))
1783 (:+key "M-/" #'hippie-completing-read)) 1737 (:+key "M-/" #'hippie-completing-read))
1784 1738
1785(setup (:straight hungry-delete) 1739(setup (:straight hungry-delete)
@@ -1918,10 +1872,7 @@
1918 (keychain-refresh-environment)) 1872 (keychain-refresh-environment))
1919 1873
1920(setup (:straight lacarte) 1874(setup (:straight lacarte)
1921 (:+key "<f10>" #'lacarte-execute-menu-command) 1875 (:+key "<f10>" #'lacarte-execute-menu-command))
1922 (with-eval-after-load 'vertico-multiform
1923 (setf (alist-get 'lacarte-execute-menu-command vertico-multiform-commands)
1924 '(buffer grid (vertico-sort-function . vertico-sort-length-alpha)))))
1925 1876
1926(setup (:straight (lin :host nil 1877(setup (:straight (lin :host nil
1927 :repo "https://git.sr.ht/~protesilaos/lin")) 1878 :repo "https://git.sr.ht/~protesilaos/lin"))
@@ -1967,7 +1918,11 @@
1967 lisp-interaction-mode-map)) 1918 lisp-interaction-mode-map))
1968 (define-key (symbol-value m) (kbd "C-c e") #'macrostep-expand))) 1919 (define-key (symbol-value m) (kbd "C-c e") #'macrostep-expand)))
1969 1920
1970(setup (:straight (magit :host github :repo "magit/magit"))) 1921(setup (:straight (magit :host github :repo "magit/magit"
1922 :build (:not compile))
1923 (:straight (transient :host github :repo "magit/transient"
1924 :build (:not compile))))
1925 (autoload 'transient--with-suspended-override "transient"))
1971 1926
1972(setup (:straight marginalia) 1927(setup (:straight marginalia)
1973 (marginalia-mode +1)) 1928 (marginalia-mode +1))
@@ -2098,12 +2053,13 @@
2098 ((,class :inherit font-lock-comment-face 2053 ((,class :inherit font-lock-comment-face
2099 :foreground ,fg-header 2054 :foreground ,fg-header
2100 :background ,yellow-intense-bg))) 2055 :background ,yellow-intense-bg)))
2101 `(mode-line 2056 ;; `(mode-line
2102 ((,class :height 100))) 2057 ;; ((,class :height 100)))
2103 `(mode-line-inactive 2058 ;; `(mode-line-inactive
2104 ((,class :height 100))) 2059 ;; ((,class :height 100)))
2105 `(tab-bar 2060 ;; `(tab-bar
2106 ((,class :height 100))))))) 2061 ;; ((,class :height 100)))
2062 ))))
2107 2063
2108 (require 'dawn) 2064 (require 'dawn)
2109 (dawn-schedule #'modus-themes-load-operandi 2065 (dawn-schedule #'modus-themes-load-operandi
@@ -2140,6 +2096,13 @@
2140 (:hook #'visual-fill-column-mode) 2096 (:hook #'visual-fill-column-mode)
2141 (:file-match (rx ".epub" eos))) 2097 (:file-match (rx ".epub" eos)))
2142 2098
2099(setup (:straight nyan-mode)
2100 (:require)
2101 ;; For some reason, in some modes the mode-line isn't updated after these
2102 ;; commands. I think it might have to do with `+modeline-position-function'.
2103 (advice-add 'end-of-buffer :after #'force-mode-line-update)
2104 (advice-add 'beginning-of-buffer :after #'force-mode-line-update))
2105
2143(setup (:straight ol-notmuch)) 2106(setup (:straight ol-notmuch))
2144 2107
2145(setup (:straight orderless) 2108(setup (:straight orderless)
@@ -2342,6 +2305,7 @@
2342 +modeline-major-mode 2305 +modeline-major-mode
2343 (lambda () (+modeline-vc " : ")) 2306 (lambda () (+modeline-vc " : "))
2344 +modeline-anzu 2307 +modeline-anzu
2308 +modeline-nyan-on-focused
2345 ) 2309 )
2346 ( ; right 2310 ( ; right
2347 simple-modeline-segment-process 2311 simple-modeline-segment-process
@@ -2350,7 +2314,6 @@
2350 (+modeline-concat 2314 (+modeline-concat
2351 '(+modeline-track 2315 '(+modeline-track
2352 simple-modeline-segment-misc-info)))) 2316 simple-modeline-segment-misc-info))))
2353 simple-modeline-segment-process
2354 ,(+modeline-concat 2317 ,(+modeline-concat
2355 '(+modeline-god-mode 2318 '(+modeline-god-mode
2356 +modeline-kmacro-indicator 2319 +modeline-kmacro-indicator
@@ -2360,7 +2323,7 @@
2360 +modeline-input-method) 2323 +modeline-input-method)
2361 " ") 2324 " ")
2362 +modeline-position 2325 +modeline-position
2363 ;; +modeline-spacer 2326 +modeline-spacer
2364 ))) 2327 )))
2365 (simple-modeline-mode +1)) 2328 (simple-modeline-mode +1))
2366 2329
@@ -2483,7 +2446,8 @@
2483(setup (:straight (twtxt 2446(setup (:straight (twtxt
2484 :fork (:repo "duckwork/twtxt-el"))) 2447 :fork (:repo "duckwork/twtxt-el")))
2485 (:option twtxt-file "/sshx:hetzner:/var/www/acdw.casa/tw.txt" 2448 (:option twtxt-file "/sshx:hetzner:/var/www/acdw.casa/tw.txt"
2486 twtxt-following '(("acdw" "https://acdw.casa/tw.txt")))) 2449 twtxt-following '(("acdw" "https://acdw.casa/tw.txt")))
2450 (+with-ensure-after-init (:require)))
2487 2451
2488(setup (:straight undo-fu) 2452(setup (:straight undo-fu)
2489 (:option undo-fu-allow-undo-in-region t) 2453 (:option undo-fu-allow-undo-in-region t)
@@ -2533,20 +2497,8 @@
2533 ;; Extensions 2497 ;; Extensions
2534 (:also-load vertico-directory 2498 (:also-load vertico-directory
2535 vertico-mouse 2499 vertico-mouse
2536 vertico-unobtrusive
2537 vertico-multiform
2538 vertico-quick) 2500 vertico-quick)
2539 (vertico-mouse-mode +1) 2501 (vertico-mouse-mode +1)
2540 (vertico-multiform-mode +1)
2541 ;; I `setf' these so they don't override the other setfs elsewhere in init.el.
2542 (setf (alist-get 'execute-extended-command vertico-multiform-commands) '(flat))
2543 (setf (alist-get 'completion-at-point vertico-multiform-commands) '(flat))
2544 (setf (alist-get 'indent-for-tab-command vertico-multiform-commands) '(flat))
2545 (setf (alist-get 'insert-char vertico-multiform-commands) nil)
2546 (setf (alist-get 'file vertico-multiform-categories) nil)
2547 (setf (alist-get 'bookmark vertico-multiform-categories) nil)
2548 ;; Default. Needs to be `add-to-list' so that it appears at the end.
2549 (add-to-list 'vertico-multiform-categories '(t flat) :append)
2550 (:with-map vertico-map 2502 (:with-map vertico-map
2551 (:bind "RET" #'vertico-directory-enter 2503 (:bind "RET" #'vertico-directory-enter
2552 "DEL" #'vertico-directory-delete-char 2504 "DEL" #'vertico-directory-delete-char
diff --git a/lisp/+elfeed.el b/lisp/+elfeed.el index 9257c8d..c3e5301 100644 --- a/lisp/+elfeed.el +++ b/lisp/+elfeed.el
@@ -46,20 +46,24 @@ If multiple items are selected, don't advance."
46 (message "[Elfeed] Update in progress") 46 (message "[Elfeed] Update in progress")
47 'ignore) 47 'ignore)
48 48
49(defvar +elfeed--update-running nil "Whether an update is currently running.") 49(defvar +elfeed--update-running-p nil "Whether an update is currently running.")
50(defvar +elfeed--update-count 0 "How many times `+elfeed-update-command' has run.") 50(defvar +elfeed--update-count 0 "How many times `+elfeed-update-command' has run.")
51(defcustom +elfeed-update-niceness 15 51(defcustom +elfeed-update-niceness 15
52 "How \"nice\" `+elfeed-update-command' should be." 52 "How \"nice\" `+elfeed-update-command' should be."
53 :type 'integer 53 :type 'integer
54 :group 'elfeed) 54 :group 'elfeed)
55 55
56(defcustom +elfeed-update-lockfile
57 (expand-file-name "+elfeed-update-lock" (temporary-file-directory))
58 "The file to ")
59
56(defun +elfeed-update-command () 60(defun +elfeed-update-command ()
57 (interactive) 61 (interactive)
58 (unless (or +elfeed--update-running 62 (unless (or +elfeed--update-running-p
59 (derived-mode-p 'elfeed-show-mode 'elfeed-search-mode)) 63 (derived-mode-p 'elfeed-show-mode 'elfeed-search-mode))
60 (let ((script (expand-file-name "/tmp/elfeed-update.el")) 64 (let ((script (expand-file-name "/tmp/elfeed-update.el"))
61 (update-message-format "[Elfeed] Background update: %s")) 65 (update-message-format "[Elfeed] Background update: %s"))
62 (setq +elfeed--update-running t) 66 (setq +elfeed--update-running-p t)
63 (elfeed-db-save) 67 (elfeed-db-save)
64 (advice-add 'elfeed :override #'+elfeed--update-message) 68 (advice-add 'elfeed :override #'+elfeed--update-message)
65 (ignore-errors (kill-buffer "*elfeed-search*")) 69 (ignore-errors (kill-buffer "*elfeed-search*"))
@@ -128,7 +132,7 @@ If multiple items are selected, don't advance."
128 script)) 132 script))
129 (lambda (proc stat) 133 (lambda (proc stat)
130 (advice-remove 'elfeed #'+elfeed--update-message) 134 (advice-remove 'elfeed #'+elfeed--update-message)
131 (setq +elfeed--update-running nil) 135 (setq +elfeed--update-running-p nil)
132 (unless (string= stat "killed") 136 (unless (string= stat "killed")
133 (setq +elfeed--update-count (1+ +elfeed--update-count))) 137 (setq +elfeed--update-count (1+ +elfeed--update-count)))
134 (message update-message-format (string-trim stat))))))) 138 (message update-message-format (string-trim stat)))))))
@@ -152,7 +156,7 @@ non-nil, proceed."
152 156
153(defun +elfeed--cancel-update-timer () 157(defun +elfeed--cancel-update-timer ()
154 "Cancel `+elfeed--update-timer'." 158 "Cancel `+elfeed--update-timer'."
155 (unless +elfeed--update-running 159 (unless +elfeed--update-running-p
156 (ignore-errors (cancel-timer +elfeed--update-timer)) 160 (ignore-errors (cancel-timer +elfeed--update-timer))
157 (setq +elfeed--update-timer nil))) 161 (setq +elfeed--update-timer nil)))
158 162
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index dedde98..7c8a1a6 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el
@@ -121,7 +121,7 @@ Do this only if the buffer is not visiting a file."
121 show-paren-when-point-inside-paren t 121 show-paren-when-point-inside-paren t
122 ;;show-trailing-whitespace t 122 ;;show-trailing-whitespace t
123 tab-bar-show 1 123 tab-bar-show 1
124 tab-width 4 124 tab-width 8 ; so alignment expecting the default looks right
125 tramp-backup-directory-alist backup-directory-alist 125 tramp-backup-directory-alist backup-directory-alist
126 undo-limit 100000000 ; 10 MB 126 undo-limit 100000000 ; 10 MB
127 use-dialog-box nil 127 use-dialog-box nil
diff --git a/lisp/+modeline.el b/lisp/+modeline.el index 33d34c3..026302b 100644 --- a/lisp/+modeline.el +++ b/lisp/+modeline.el
@@ -9,6 +9,7 @@
9;;; Code: 9;;; Code:
10 10
11(require '+util) 11(require '+util)
12(require 'actually-selected-window)
12(require 'simple-modeline) 13(require 'simple-modeline)
13(require 'minions) 14(require 'minions)
14 15
@@ -472,5 +473,13 @@ to a function in the current buffer, call that function instead."
472 (kmacro-end-macro nil))))) 473 (kmacro-end-macro nil)))))
473 'mouse-face 'mode-line-highlight)))) 474 'mouse-face 'mode-line-highlight))))
474 475
476(defun +modeline-nyan-on-focused (&optional spacer)
477 "Display the cat from `nyan-mode', but only on the focused window."
478 (require 'nyan-mode)
479 (when (actually-selected-window-p)
480 (concat (or spacer "") (nyan-create)
481 (propertize "."
482 'face 'font-lock-comment-face))))
483
475(provide '+modeline) 484(provide '+modeline)
476;;; +modeline.el ends here 485;;; +modeline.el ends here
diff --git a/lisp/+setup.el b/lisp/+setup.el index 919e312..1f110d6 100644 --- a/lisp/+setup.el +++ b/lisp/+setup.el
@@ -80,21 +80,22 @@ If PATH does not exist, abort the evaluation."
80 80
81;;; Straight.el 81;;; Straight.el
82 82
83(with-eval-after-load 'straight 83(defun setup--straight-handle-arg (arg var)
84 (defun setup--straight-handle-arg (arg var) 84 (cond
85 (cond 85 ((and (boundp var) (symbol-value var)) t)
86 ((and (boundp var) (symbol-value var)) t) 86 ((keywordp arg) (set var t))
87 ((keywordp arg) (set var t)) 87 ((functionp arg) (set var nil) (funcall arg))
88 ((functionp arg) (set var nil) (funcall arg)) 88 ((listp arg) (set var nil) arg)))
89 ((listp arg) (set var nil) (eval arg :lexical))))
90 89
90(with-eval-after-load 'straight
91 (setup-define :straight 91 (setup-define :straight
92 (lambda (recipe &rest predicates) 92 (lambda (recipe &rest predicates)
93 (let* ((skp (make-symbol "straight-keyword-p")) 93 (let* ((skp (make-symbol "straight-keyword-p"))
94 (straight-use-p 94 (straight-use-p
95 (cl-every (lambda (f) (setup--straight-handle-arg f skp)) 95 (cl-mapcar
96 predicates)) 96 (lambda (f) (setup--straight-handle-arg f skp))
97 (form `(unless (and ,straight-use-p 97 predicates))
98 (form `(unless (and ,@straight-use-p
98 (condition-case e 99 (condition-case e
99 (straight-use-package ',recipe) 100 (straight-use-package ',recipe)
100 (error 101 (error
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index e9daaf4..3e6968e 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el
@@ -7,6 +7,7 @@
7 7
8;;; Code: 8;;; Code:
9 9
10(require 'acdw)
10(require 'tab-bar) 11(require 'tab-bar)
11 12
12(defface +tab-bar-extra 13(defface +tab-bar-extra
@@ -35,7 +36,7 @@
35 "Display `tracking-mode-line-buffers' in the tab-bar." 36 "Display `tracking-mode-line-buffers' in the tab-bar."
36 ;; TODO: write something to convert a mode-line construct to a tab-bar 37 ;; TODO: write something to convert a mode-line construct to a tab-bar
37 ;; construct. 38 ;; construct.
38 (when (and tracking-mode 39 (when (and (bound-and-true-p tracking-mode)
39 (not (and +tracking-hide-when-org-clocking 40 (not (and +tracking-hide-when-org-clocking
40 (bound-and-true-p org-clock-current-task)))) 41 (bound-and-true-p org-clock-current-task))))
41 (cons (when (> (length tracking-mode-line-buffers) 0) 42 (cons (when (> (length tracking-mode-line-buffers) 0)
@@ -261,14 +262,8 @@ name to the left."
261 (require 'shr) ; `shr-string-pixel-width' 262 (require 'shr) ; `shr-string-pixel-width'
262 (let* ((rest (cdr (memq '+tab-bar-format-align-right tab-bar-format))) 263 (let* ((rest (cdr (memq '+tab-bar-format-align-right tab-bar-format)))
263 (rest (tab-bar-format-list rest)) 264 (rest (tab-bar-format-list rest))
264 (rest (mapconcat (lambda (item) x(nth 2 item)) rest "")) 265 (rest (mapconcat (lambda (item) (nth 2 item)) rest ""))
265 (hpos 266 (hpos (shr-string-pixel-width rest))
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))))
272 (str (propertize " " 'display `(space :align-to (- right (,hpos)))))) 267 (str (propertize " " 'display `(space :align-to (- right (,hpos))))))
273 `((align-right menu-item ,str ignore)))) 268 `((align-right menu-item ,str ignore))))
274 269
diff --git a/lisp/acdw.el b/lisp/acdw.el index 191cdfb..fdcca84 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -288,6 +288,13 @@ always nil; this function is mostly intended for use in init."
288 :type '(repeat function) 288 :type '(repeat function)
289 :group 'applications) 289 :group 'applications)
290 290
291(defun +string-repeat (n str)
292 "Repeat STR N times."
293 (let ((r ""))
294 (dotimes (_ n)
295 (setq r (concat r str)))
296 r))
297
291(defun chat-disconnect () 298(defun chat-disconnect ()
292 "Disconnect from all chats." 299 "Disconnect from all chats."
293 (interactive) 300 (interactive)
diff --git a/machines/bob.el b/machines/bob.el index e043719..06e605a 100644 --- a/machines/bob.el +++ b/machines/bob.el
@@ -13,7 +13,7 @@
13 (italic-face nil) 13 (italic-face nil)
14 ;; (bold-face nil) 14 ;; (bold-face nil)
15 (mono-face nil) 15 (mono-face nil)
16 (var-face "IBM Plex Serif") 16 (var-face "IBM Plex Sans")
17 (var-size 1.0)) 17 (var-size 1.0))
18 (+set-faces 18 (+set-faces
19 `((default 19 `((default