about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el64
1 files changed, 50 insertions, 14 deletions
diff --git a/init.el b/init.el index 9c44e8b..4ea6f90 100644 --- a/init.el +++ b/init.el
@@ -39,6 +39,7 @@
39 "C-x o" (lambda () (interactive) (switch-to-buffer nil)) 39 "C-x o" (lambda () (interactive) (switch-to-buffer nil))
40 "C-x C-o" #'+open-paragraph 40 "C-x C-o" #'+open-paragraph
41 "C-w" #'+kill-word-backward-or-region 41 "C-w" #'+kill-word-backward-or-region
42 "C-x C-m" #'execute-extended-command ; original: coding systems
42 ;; "C-x C-1" #'delete-other-windows 43 ;; "C-x C-1" #'delete-other-windows
43 ;; "C-x 2" #'+split-window-below-then 44 ;; "C-x 2" #'+split-window-below-then
44 ;; "C-x C-2" #'+split-window-below-then 45 ;; "C-x C-2" #'+split-window-below-then
@@ -342,6 +343,8 @@
342 eshell-prompt-regexp (rx bol (* (not (any ?# ?$ ?\n))) 343 eshell-prompt-regexp (rx bol (* (not (any ?# ?$ ?\n)))
343 " " (any ?# ?$) 344 " " (any ?# ?$)
344 (* " "))) 345 (* " ")))
346 (:+leader "s" #'+eshell-here
347 "C-s" #'+eshell-here)
345 (with-eval-after-load 'mwim 348 (with-eval-after-load 'mwim
346 (setf (alist-get 'eshell-mode mwim-beginning-of-line-function) 349 (setf (alist-get 'eshell-mode mwim-beginning-of-line-function)
347 #'eshell-bol)) 350 #'eshell-bol))
@@ -350,19 +353,19 @@
350 (dolist (mode '((hungry-delete-mode . -1))) 353 (dolist (mode '((hungry-delete-mode . -1)))
351 (funcall (car mode) (cdr mode))) 354 (funcall (car mode) (cdr mode)))
352 ;; Set local settings 355 ;; Set local settings
353 (dolist (setting (list (cons 'outline-regexp eshell-prompt-regexp) 356 (dolist (setting `((outline-regexp . ,eshell-prompt-regexp)
354 (cons 'page-delimiter eshell-prompt-regexp) 357 (page-delimiter . ,eshell-prompt-regexp)
355 (cons 'imenu-generic-expression 358 (imenu-generic-expression "Prompt"
356 (list "Prompt" 359 ,(concat eshell-prompt-regexp
357 (concat eshell-prompt-regexp 360 "\\(.*\\)")
358 "\\(.*\\)") 361 1)
359 1)) 362 (truncate-lines . t)
360 (cons 'truncate-lines t))) 363 (scroll-margin . 0)))
361 (set (make-local-variable (car setting)) (cdr setting))) 364 (set (make-local-variable (car setting)) (cdr setting)))
362 ;; Bind keys 365 ;; Bind keys
363 (dolist (binding '(("C-d" . +eshell-quit-or-delete-char))) 366 (dolist (binding '(("C-d" . +eshell-quit-or-delete-char)))
364 (define-key eshell-mode-map 367 (define-key eshell-mode-map
365 (kbd (car binding)) (cdr binding))) 368 (kbd (car binding)) (cdr binding)))
366 ;; Environment variables 369 ;; Environment variables
367 (dolist (environment '(("PAGER" . "cat"))) 370 (dolist (environment '(("PAGER" . "cat")))
368 (setenv (car environment) (cdr environment))))) 371 (setenv (car environment) (cdr environment)))))
@@ -425,6 +428,8 @@
425 428
426(setup info 429(setup info
427 (:also-load +Info) 430 (:also-load +Info)
431 (dolist (dir (split-string (getenv "INFOPATH") ":" t))
432 (add-to-list 'Info-additional-directory-list dir))
428 (:with-mode Info-mode ; -_- 433 (:with-mode Info-mode ; -_-
429 (:hook #'reading-mode) 434 (:hook #'reading-mode)
430 (:bind "c" #'+Info-copy-current-node-name 435 (:bind "c" #'+Info-copy-current-node-name
@@ -836,11 +841,11 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
836 (and (executable-find "find") 841 (and (executable-find "find")
837 (executable-find "grep")))) 842 (executable-find "grep"))))
838 (:load-after consult orderless vertico) 843 (:load-after consult orderless vertico)
839 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input _type) 844 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _)
840 (setq input (orderless-pattern-compiler input)) 845 (setq input (orderless-pattern-compiler input))
841 (cons input (lambda (str) (orderless--highlight input str))))) 846 (cons input (lambda (str) (orderless--highlight input str)))))
842 (+with-eval-after-loads (affe vertico-multiform) 847 (+with-eval-after-loads (affe vertico-multiform)
843 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input _type) 848 (setq affe-regexp-compiler (defun affe-orderless-regexp-compiler (input &rest _)
844 (setq input (orderless-pattern-compiler input)) 849 (setq input (orderless-pattern-compiler input))
845 (cons input (lambda (str) (orderless--highlight input str))))) 850 (cons input (lambda (str) (orderless--highlight input str)))))
846 (setf (alist-get 'affe-grep vertico-multiform-commands) '(buffer) 851 (setf (alist-get 'affe-grep vertico-multiform-commands) '(buffer)
@@ -1285,7 +1290,6 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
1285 "M-w" #'+crux-kill-ring-save 1290 "M-w" #'+crux-kill-ring-save
1286 "C-k" #'crux-kill-and-join-forward 1291 "C-k" #'crux-kill-and-join-forward
1287 "C-c d" #'+crux-insert-date-or-time) 1292 "C-c d" #'+crux-insert-date-or-time)
1288 (:+leader "s" #'crux-visit-shell-buffer)
1289 (crux-with-region-or-buffer indent-region) 1293 (crux-with-region-or-buffer indent-region)
1290 1294
1291 (el-patch-feature crux) 1295 (el-patch-feature crux)
@@ -1394,8 +1398,17 @@ See also `crux-reopen-as-root-mode'."
1394 (:hook #'reading-mode) 1398 (:hook #'reading-mode)
1395 (:option +elfeed--update-repeat (* 60 30) ; 1/2 hour 1399 (:option +elfeed--update-repeat (* 60 30) ; 1/2 hour
1396 +elfeed--update-first-time 60)) 1400 +elfeed--update-first-time 60))
1397 (+elfeed-update-async-mode -1) ; It really messes with stuff for work 1401 (+elfeed-update-async-mode +1)
1398 ) 1402 (add-hook '+elfeed-update-proceed-hook (defun non-work-hours? ()
1403 "Return nil if during work hours, t otherwise."
1404 (let* ((now (current-time))
1405 (now* (decode-time now))
1406 (work-start* (append '(0 0 8) (cdddr now*))) ; 8:00 AM
1407 (work-end* (append '(0 0 18) (cdddr now*))) ; 6:00 PM
1408 (work-start (encode-time work-start*))
1409 (work-end (encode-time work-end*)))
1410 (or (time-less-p now work-start)
1411 (time-less-p work-end now))))))
1399 1412
1400(setup (:straight elfeed-org) 1413(setup (:straight elfeed-org)
1401 (:also-load +org-capture) 1414 (:also-load +org-capture)
@@ -1530,6 +1543,7 @@ See also `crux-reopen-as-root-mode'."
1530 geiser-chicken 1543 geiser-chicken
1531 macrostep-geiser 1544 macrostep-geiser
1532 scheme-complete) 1545 scheme-complete)
1546 (:also-load +chicken)
1533 (setf (alist-get "\\.scm\\'" auto-mode-alist nil nil #'string=) 1547 (setf (alist-get "\\.scm\\'" auto-mode-alist nil nil #'string=)
1534 'scheme-mode)) 1548 'scheme-mode))
1535 1549
@@ -1776,6 +1790,28 @@ See also `crux-reopen-as-root-mode'."
1776 :now))))) 1790 :now)))))
1777 (:face modus-themes-tab-active ((t :bold nil)) 1791 (:face modus-themes-tab-active ((t :bold nil))
1778 modus-themes-tab-inactive ((t :italic t))) 1792 modus-themes-tab-inactive ((t :italic t)))
1793
1794 (add-hook 'modus-themes-after-load-theme-hook
1795 (defun +modus-themes-mostly-monochrome ()
1796 "Set up mdous-themes to be mostly monochrome."
1797 (modus-themes-with-colors
1798 (custom-set-faces
1799 `(font-lock-builtin-face ((,class :inherit modus-themes-bold :foreground unspecified)))
1800 `(font-lock-comment-delimiter-face ((,class :inherit font-lock-comment-face)))
1801 `(font-lock-comment-face ((,class :inherit modus-themes-slant :foreground ,fg-docstring)))
1802 `(font-lock-constant-face ((,class :foreground unspecified)))
1803 `(font-lock-doc-face ((,class :inherit modus-themes-slant :foreground ,fg-docstring)))
1804 `(font-lock-function-name-face ((,class :foreground unspecified)))
1805 `(font-lock-keyword-face ((,class :inherit modus-themes-bold :foreground unspecified)))
1806 `(font-lock-negation-char-face ((,class :inherit modus-themes-bold :foreground unspecified)))
1807 `(font-lock-preprocessor-face ((,class :foreground unspecified)))
1808 `(font-lock-regexp-grouping-backslash ((,class :foreground ,fg-escape-char-backslash)))
1809 `(font-lock-regexp-grouping-construct ((,class :foreground ,fg-escape-char-construct)))
1810 `(font-lock-string-face ((,class :inherit modus-themes-slant :foreground unspecified)))
1811 `(font-lock-type-face ((,class :inherit modus-themes-bold :foreground unspecified)))
1812 `(font-lock-variable-name-face ((,class :foreground unspecified)))
1813 `(font-lock-warning-face ((,class :inherit modus-themes-bold :foreground ,red-nuanced-fg)))))))
1814
1779 (dawn-schedule #'modus-themes-load-operandi 1815 (dawn-schedule #'modus-themes-load-operandi
1780 #'modus-themes-load-vivendi)) 1816 #'modus-themes-load-vivendi))
1781 1817