diff options
-rw-r--r-- | init.el | 78 | ||||
-rw-r--r-- | machines/larry.el | 13 | ||||
-rw-r--r-- | ponder.png | bin | 917646 -> 917644 bytes |
3 files changed, 52 insertions, 39 deletions
diff --git a/init.el b/init.el index 5e52215..1a9c6a9 100644 --- a/init.el +++ b/init.el | |||
@@ -177,42 +177,41 @@ | |||
177 | (add-to-list '+browse-url-secondary-browser-regexps | 177 | (add-to-list '+browse-url-secondary-browser-regexps |
178 | (replace-regexp-in-string "\\." "\\\\." domain))) | 178 | (replace-regexp-in-string "\\." "\\\\." domain))) |
179 | ;; Set up URL handlers. | 179 | ;; Set up URL handlers. |
180 | (with-eval-after-load 'org-contacts | 180 | (require 'chd) |
181 | (require 'chd) | 181 | (+browse-url-set-handlers |
182 | (+browse-url-set-handlers | 182 | (list |
183 | (list | 183 | (cons (rx ; images |
184 | (cons (rx ; images | 184 | "." (or "jpeg" "jpg" "png" "bmp") eos) |
185 | "." (or "jpeg" "jpg" "png" "bmp") eos) | 185 | (lambda (&rest args) |
186 | (lambda (&rest args) | 186 | (apply |
187 | (apply | 187 | (cond ((executable-find "mpv") #'+browse-image-with-mpv) |
188 | (cond ((executable-find "mpv") #'+browse-image-with-mpv) | 188 | (t #'eww-browse-url)) |
189 | (t #'eww-browse-url)) | 189 | args))) |
190 | args))) | 190 | (cons (rx (or ;; videos |
191 | (cons (rx (or ;; videos | 191 | "youtube.com" "youtu.be" "invidious" "yewtu.be" |
192 | "youtube.com" "youtu.be" "invidious" "yewtu.be" | 192 | (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos) |
193 | (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos) | 193 | ;; music |
194 | ;; music | 194 | "soundcloud.com" "bandcamp.com" |
195 | "soundcloud.com" "bandcamp.com" | 195 | (seq "." (or "ogg" "mp3" "opus" "m4a") eos))) |
196 | (seq "." (or "ogg" "mp3" "opus" "m4a") eos))) | 196 | (lambda (&rest args) |
197 | (lambda (&rest args) | 197 | (apply (if (executable-find "mpv") |
198 | (apply (if (executable-find "mpv") | 198 | #'+browse-url-with-mpv |
199 | #'+browse-url-with-mpv | 199 | browse-url-secondary-browser-function) |
200 | browse-url-secondary-browser-function) | 200 | args))) |
201 | args))) | 201 | (cons chd/url-regexps #'browse-url-chrome) |
202 | (cons chd/url-regexps #'browse-url-chrome) | 202 | (cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites |
203 | (cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites | 203 | (lambda (&rest args) |
204 | (lambda (&rest args) | 204 | (apply browse-url-secondary-browser-function args))) |
205 | (apply browse-url-secondary-browser-function args))) | 205 | (cons "xkcd\\.com" |
206 | (cons "xkcd\\.com" | 206 | (lambda (&rest args) |
207 | (lambda (&rest args) | 207 | (apply (if (fboundp #'xkcd-get) |
208 | (apply (if (fboundp #'xkcd-get) | 208 | (progn (require '+xkcd) |
209 | (progn (require '+xkcd) | 209 | #'+xkcd-get-from-url) |
210 | #'+xkcd-get-from-url) | 210 | +browse-url-browser-function) |
211 | +browse-url-browser-function) | 211 | args))) |
212 | args))) | 212 | (cons "." ; everything else |
213 | (cons "." ; everything else | 213 | (lambda (&rest args) |
214 | (lambda (&rest args) | 214 | (apply +browse-url-browser-function args))))) |
215 | (apply +browse-url-browser-function args)))))) | ||
216 | ;; Transform URLs before passing to `browse-url' | 215 | ;; Transform URLs before passing to `browse-url' |
217 | (:option +browse-url-transformations `((,(rx (or "youtube.com" | 216 | (:option +browse-url-transformations `((,(rx (or "youtube.com" |
218 | "youtu.be")) | 217 | "youtu.be")) |
@@ -818,9 +817,10 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers." | |||
818 | (and (executable-find "find") | 817 | (and (executable-find "find") |
819 | (executable-find "grep")))) | 818 | (executable-find "grep")))) |
820 | (:load-after consult orderless vertico) | 819 | (:load-after consult orderless vertico) |
821 | (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input _type) | 820 | (setq affe-regexp-compiler |
822 | (setq input (orderless-pattern-compiler input)) | 821 | (defun affe-orderless-regexp-compiler (input &rest _) |
823 | (cons input (lambda (str) (orderless--highlight input str))))) | 822 | (setq input (orderless-pattern-compiler input)) |
823 | (cons input (lambda (str) (orderless--highlight input str))))) | ||
824 | (with-eval-after-load 'affe | 824 | (with-eval-after-load 'affe |
825 | (setf (alist-get 'affe-grep vertico-multiform-commands) '(buffer) | 825 | (setf (alist-get 'affe-grep vertico-multiform-commands) '(buffer) |
826 | (alist-get 'affe-find vertico-multiform-commands) '(buffer)) | 826 | (alist-get 'affe-find vertico-multiform-commands) '(buffer)) |
diff --git a/machines/larry.el b/machines/larry.el new file mode 100644 index 0000000..ba4edb2 --- /dev/null +++ b/machines/larry.el | |||
@@ -0,0 +1,13 @@ | |||
1 | ;;; larry.el --- Customizations for "larry" -*- lexical-binding: t; -*- | ||
2 | |||
3 | ;;; Code: | ||
4 | |||
5 | (require 'acdw) | ||
6 | (require 'machine) | ||
7 | |||
8 | (add-function :after machine-after-load-theme | ||
9 | (defun +larry-set-faces (&rest _) | ||
10 | (+set-faces | ||
11 | `((default :family "DejaVu Sans Mono") | ||
12 | (fixed-pitch :family "DejaVu Sans Mono") | ||
13 | (variable-pitch :family "DejaVu Sans"))))) | ||
diff --git a/ponder.png b/ponder.png index 4769dcb..c7b9a8e 100644 --- a/ponder.png +++ b/ponder.png | |||
Binary files differ | |||