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.el185
1 files changed, 129 insertions, 56 deletions
diff --git a/init.el b/init.el index c1a1cd2..4e353df 100644 --- a/init.el +++ b/init.el
@@ -45,9 +45,15 @@
45 ;; "C-x t" #'beginning-of-buffer 45 ;; "C-x t" #'beginning-of-buffer
46 ;; "C-x e" #'end-of-buffer 46 ;; "C-x e" #'end-of-buffer
47 ) 47 )
48 ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults 48 ;; ;; C-h deletes backward - see https://idiomdrottning.org/bad-emacs-defaults
49 (global-set-key (kbd "C-h") 'delete-backward-char) 49 (global-set-key (kbd "C-h") 'delete-backward-char)
50 (keyboard-translate ?\C-h ?\C-?) 50 (keyboard-translate ?\C-h ?\C-?)
51 ;; Faces
52 (dolist (face '(line-number
53 line-number-major-tick
54 line-number-minor-tick
55 line-number-current-line))
56 (:face face '((t (:inherit fixed-pitch)))))
51 ;; Hooks 57 ;; Hooks
52 (add-hook 'prog-mode-hook #'turn-on-auto-fill) 58 (add-hook 'prog-mode-hook #'turn-on-auto-fill)
53 (add-hook 'prog-mode-hook #'font-lock-todo-insinuate) 59 (add-hook 'prog-mode-hook #'font-lock-todo-insinuate)
@@ -72,6 +78,9 @@
72 (:local-set truncate-lines t))) 78 (:local-set truncate-lines t)))
73 79
74(setup (:require autoinsert) 80(setup (:require autoinsert)
81 (auto-insert-mode +1))
82
83(setup (:require autoinsert)
75 (setf (alist-get "\\.scm" auto-insert-alist nil nil #'equal) 84 (setf (alist-get "\\.scm" auto-insert-alist nil nil #'equal)
76 '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n")) 85 '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n"))
77;; (auto-insert-mode +1) 86;; (auto-insert-mode +1)
@@ -91,7 +100,8 @@
91 (dolist (var '(safe-local-variable-values 100 (dolist (var '(safe-local-variable-values
92 warning-suppress-types)) 101 warning-suppress-types))
93 (add-to-list '+custom-variable-allowlist var)) 102 (add-to-list '+custom-variable-allowlist var))
94 (+custom-load-ignoring-most-customizations) 103 (+ensure-after-init
104 (+custom-load-ignoring-most-customizations))
95 (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets) 105 (advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets)
96 (:with-mode Custom-mode 106 (:with-mode Custom-mode
97 (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression))) 107 (:local-set imenu-generic-expression +cus-edit-imenu-generic-expression)))
@@ -107,7 +117,7 @@
107 pulse-delay 0.5 117 pulse-delay 0.5
108 pulse-iterations 1) 118 pulse-iterations 1)
109 (dolist (command '(+ace-window-or-switch-buffer 119 (dolist (command '(+ace-window-or-switch-buffer
110 pop-mark pop-globl-mark 120 pop-mark pop-global-mark
111 Info-history-back Info-history-forward)) 121 Info-history-back Info-history-forward))
112 (add-to-list '+pulse-location-commands command)) 122 (add-to-list '+pulse-location-commands command))
113 (+ensure-after-init #'+pulse-location-mode)) 123 (+ensure-after-init #'+pulse-location-mode))
@@ -126,9 +136,9 @@
126(setup +key 136(setup +key
127 (+ensure-after-init #'+key-global-mode)) 137 (+ensure-after-init #'+key-global-mode))
128 138
129;;(setup _work 139(setup _work
130;; (+with-ensure-after-init 140 (+with-ensure-after-init
131;; (require '_work))) 141 (require '_work)))
132 142
133(setup abbrev 143(setup abbrev
134 (:option abbrev-file-name (sync/ "abbrev.el") 144 (:option abbrev-file-name (sync/ "abbrev.el")
@@ -486,7 +496,7 @@
486 496
487(setup notmuch 497(setup notmuch
488 (:load-from "~/usr/share/emacs/site-lisp/") 498 (:load-from "~/usr/share/emacs/site-lisp/")
489 (:load-after org-contacts) 499 (:load-after bbdb)
490 (:also-load +notmuch +message) 500 (:also-load +notmuch +message)
491 (+define-dir notmuch/ (sync/ "emacs/notmuch") 501 (+define-dir notmuch/ (sync/ "emacs/notmuch")
492 "Notmuch configuration and data.") 502 "Notmuch configuration and data.")
@@ -530,7 +540,9 @@
530 (list :name "drafts" :query "tag:draft" :key "d") 540 (list :name "drafts" :query "tag:draft" :key "d")
531 (list :name "all mail" :query "*" :key "a")))) 541 (list :name "all mail" :query "*" :key "a"))))
532 (:+leader "m" #'+notmuch-goto "C-m" #'+notmuch-goto 542 (:+leader "m" #'+notmuch-goto "C-m" #'+notmuch-goto
533 "n" #'notmuch "C-n" #'notmuch)) 543 "n" #'notmuch "C-n" #'notmuch)
544 ;; For `focus'
545 (put 'notmuch-message 'bounds-of-thing-at-point 'notmuch-show-message-extent))
534 546
535(setup org 547(setup org
536 ;; Plain org with the `setup' form for sorting, but I install with straight. 548 ;; Plain org with the `setup' form for sorting, but I install with straight.
@@ -552,6 +564,7 @@
552 (cl-remove-if (lambda (path) (string-match-p "lisp/org\\'" path)) load-path)) 564 (cl-remove-if (lambda (path) (string-match-p "lisp/org\\'" path)) load-path))
553 (:also-load +org) 565 (:also-load +org)
554 (:option org-adapt-indentation nil 566 (:option org-adapt-indentation nil
567 org-auto-align-tags t
555 org-archive-mark-done t 568 org-archive-mark-done t
556 org-catch-invisible-edits 'show-and-error 569 org-catch-invisible-edits 'show-and-error
557 org-clock-clocked-in-display 'mode-line 570 org-clock-clocked-in-display 'mode-line
@@ -575,6 +588,7 @@
575 org-imenu-depth 3 588 org-imenu-depth 3
576 org-indent-indentation-per-level 0 589 org-indent-indentation-per-level 0
577 org-indent-mode-turns-on-hiding-stars nil 590 org-indent-mode-turns-on-hiding-stars nil
591 org-insert-heading-respect-content t
578 org-list-demote-modify-bullet '(("-" . "+") 592 org-list-demote-modify-bullet '(("-" . "+")
579 ("+" . "-")) 593 ("+" . "-"))
580 org-log-done 'time 594 org-log-done 'time
@@ -595,7 +609,7 @@
595 org-src-window-setup 'current-window 609 org-src-window-setup 'current-window
596 org-startup-truncated nil 610 org-startup-truncated nil
597 org-startup-with-inline-images t 611 org-startup-with-inline-images t
598 org-tags-column (- (- fill-column (length org-ellipsis))) 612 org-tags-column 1 ;; (- (- fill-column (length org-ellipsis)))
599 org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)" 613 org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "ONGOING(o@)"
600 "|" "DONE(d!)") 614 "|" "DONE(d!)")
601 (sequence "|" "CANCELED(k@)") 615 (sequence "|" "CANCELED(k@)")
@@ -621,13 +635,25 @@
621 "C-c l" #'org-store-link) 635 "C-c l" #'org-store-link)
622 (:hook #'variable-pitch-mode 636 (:hook #'variable-pitch-mode
623 #'turn-off-auto-fill 637 #'turn-off-auto-fill
624 #'org-indent-mode) 638 #'org-indent-mode
639 #'prettify-symbols-mode
640 ;; TODO: This is only the beginning of a larger idea: I really want the
641 ;; "buffer stats" section of the mode-line to change depending on the
642 ;; mode. So like, org-mode would be a word count (maybe other text
643 ;; modes?), lui-modes could be .... something? etc.
644 (defun turn-off-column-number-mode () (setq-local column-number-mode nil)))
645 (:local-set prettify-symbols-alist '(("DEADLINE:" . ?⏰)
646 ("SCHEDULED:" . ?📅)
647 ("CLOSED:" ?✅))
648 ;;+modeline-position-function #'+org-count-words-stupidly
649 )
625 (:local-hook user-save-hook #'+org-before-save@prettify-buffer) 650 (:local-hook user-save-hook #'+org-before-save@prettify-buffer)
626 (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char) 651 (advice-add #'org-delete-backward-char :override #'+org-delete-backward-char)
627 ;; (define-advice org-open-at-point (:around (fn &rest r) open-external) 652 ;; (define-advice org-open-at-point (:around (fn &rest r) open-external)
628 ;; "Open links from org externally." 653 ;; "Open links from org externally."
629 ;; (let ((browse-url-browser-function browse-url-secondary-browser-function)) 654 ;; (let ((browse-url-browser-function browse-url-secondary-browser-function))
630 ;; (apply fn r))) 655 ;; (apply fn r)))
656 ;; (add-to-list '+custom-variable-allowlist 'org-agenda-files)
631 (with-eval-after-load 'org 657 (with-eval-after-load 'org
632 (setf (alist-get "\\.x?html?\\'" org-file-apps nil nil #'equal) 658 (setf (alist-get "\\.x?html?\\'" org-file-apps nil nil #'equal)
633 #'+org-open-html) 659 #'+org-open-html)
@@ -653,11 +679,10 @@
653 (0 ;; (progn (compose-region (match-beginning 1) (match-end 1) "→") 'fixed-pitch) 679 (0 ;; (progn (compose-region (match-beginning 1) (match-end 1) "→") 'fixed-pitch)
654 'fixed-pitch t)) 680 'fixed-pitch t))
655 ;; Fancy numbered lists (well, monospaced) 681 ;; Fancy numbered lists (well, monospaced)
656 ("^[ \t]*\\(\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\) " 0 'fixed-pitch t))) 682 ("^[ \t]*\\(\\(?:[0-9]+\\|[A-Za-z]\\)[.)]\\) " 0 'fixed-pitch t)
657 ;; Make nobreak-space fixed-pitch as well, for better alignment (is this the 683 ;; Make leading org-heading stars fixed-pitch
658 ;; best way to do this? probably not!) 684 ("^\*+ " 0 'fixed-pitch t)
659 (:face org-indent ((t (:inherit (fixed-pitch)))) 685 ))
660 nobreak-space ((t (:inherit (fixed-pitch)))))
661 (with-eval-after-load 'form-feed 686 (with-eval-after-load 'form-feed
662 ;; Horizontal lines 687 ;; Horizontal lines
663 (font-lock-add-keywords 688 (font-lock-add-keywords
@@ -672,6 +697,13 @@
672 (:option org-agenda-skip-deadline-if-done t 697 (:option org-agenda-skip-deadline-if-done t
673 org-agenda-skip-scheduled-if-done t 698 org-agenda-skip-scheduled-if-done t
674 org-agenda-span 10 699 org-agenda-span 10
700 org-agenda-block-separator ?─
701 org-agenda-time-grid
702 '((daily today require-timed)
703 (800 1000 1200 1400 1600 1800 2000)
704 " ┄┄┄┄┄ " "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄")
705 org-agenda-current-time-string
706 "← now ─────────────────────────────────────────────────"
675 org-agenda-include-diary nil ; I use the org-diary features 707 org-agenda-include-diary nil ; I use the org-diary features
676 org-agenda-todo-ignore-deadlines 'near 708 org-agenda-todo-ignore-deadlines 'near
677 org-agenda-todo-ignore-scheduled 'future 709 org-agenda-todo-ignore-scheduled 'future
@@ -679,12 +711,12 @@
679 org-deadline-warning-days 0 711 org-deadline-warning-days 0
680 org-agenda-show-future-repeats 'next 712 org-agenda-show-future-repeats 'next
681 org-agenda-window-setup 'current-window) 713 org-agenda-window-setup 'current-window)
714 (unless after-init-time
715 (:option org-agenda-files (list (sync/ "org/"))))
682 (dolist (var '(org-agenda-files 716 (dolist (var '(org-agenda-files
683 org-agenda-file-regexp 717 org-agenda-file-regexp
684 org-agenda-templates)) 718 org-agenda-templates))
685 (add-to-list '+custom-variable-allowlist var)) 719 (add-to-list '+custom-variable-allowlist var))
686 (with-eval-after-load 'org
687 (add-to-list 'org-agenda-files (sync/ "org/" t)))
688 (:+leader "a" #'org-agenda "C-a" #'org-agenda) 720 (:+leader "a" #'org-agenda "C-a" #'org-agenda)
689 (:hook #'hl-line-mode) 721 (:hook #'hl-line-mode)
690 (add-hook 'org-agenda-after-show-hook 'org-narrow-to-subtree)) 722 (add-hook 'org-agenda-after-show-hook 'org-narrow-to-subtree))
@@ -764,6 +796,9 @@
764 (:option password-cache t 796 (:option password-cache t
765 password-cache-expiry (* 60 60))) 797 password-cache-expiry (* 60 60)))
766 798
799(setup prettify-symbols-mode
800 (:option prettify-symbols-unprettify-at-point t))
801
767(setup prog 802(setup prog
768 (:local-set comment-auto-fill-only-comments t) 803 (:local-set comment-auto-fill-only-comments t)
769 (:hook #'prettify-symbols-mode)) 804 (:hook #'prettify-symbols-mode))
@@ -809,7 +844,7 @@
809 tab-bar-format-tabs 844 tab-bar-format-tabs
810 tab-bar-separator 845 tab-bar-separator
811 tab-bar-format-add-tab 846 tab-bar-format-add-tab
812 tab-bar-format-align-right 847 +tab-bar-format-align-right
813 ;;+tab-bar-misc-info 848 ;;+tab-bar-misc-info
814 +tab-bar-org-clock 849 +tab-bar-org-clock
815 +tab-bar-bongo 850 +tab-bar-bongo
@@ -846,9 +881,10 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
846 (:require +ace-window) 881 (:require +ace-window)
847 (:option aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l) 882 (:option aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
848 aw-display-mode-overlay nil 883 aw-display-mode-overlay nil
849 aw-scope 'frame) 884 aw-scope 'frame
885 aw-minibuffer-flag t)
850 (:+key "M-o" #'+ace-window-or-switch-buffer) 886 (:+key "M-o" #'+ace-window-or-switch-buffer)
851 (:face aw-mode-line-face ((t (:foreground "red")))) 887 (:face 'aw-mode-line-face '((t (:foreground "red"))))
852 (+ace-window-display-mode +1)) 888 (+ace-window-display-mode +1))
853 889
854(setup (:straight (actually-selected-window 890(setup (:straight (actually-selected-window
@@ -896,8 +932,8 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
896 '(avy-lead-face 932 '(avy-lead-face
897 avy-lead-face-1 avy-lead-face-1 avy-lead-face-1 933 avy-lead-face-1 avy-lead-face-1 avy-lead-face-1
898 avy-lead-face-1 avy-lead-face-1 avy-lead-face-1)) 934 avy-lead-face-1 avy-lead-face-1 avy-lead-face-1))
899 (:face avy-background-face 935 (:face 'avy-background-face
900 ((t (:foreground "#888888")))) 936 '((t (:foreground "#888888"))))
901 (:+key "M-j" #'avy-goto-char-timer) 937 (:+key "M-j" #'avy-goto-char-timer)
902 (:bind-into isearch 938 (:bind-into isearch
903 "M-j" #'avy-isearch) 939 "M-j" #'avy-isearch)
@@ -1120,11 +1156,11 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
1120 (0x0-upload-text (0x0--choose-server))) 1156 (0x0-upload-text (0x0--choose-server)))
1121 (current-kill 0))) 1157 (current-kill 0)))
1122 (add-to-list '+pulse-location-commands #'lui-track-jump-to-indicator) 1158 (add-to-list '+pulse-location-commands #'lui-track-jump-to-indicator)
1123 (:face lui-track-bar ((t (:height 10 1159 (:face 'lui-track-bar '((t ( :height 10
1124 :underline (:color foreground-color 1160 :underline ( :color foreground-color
1125 :style line 1161 :style line
1126 :position line) 1162 :position line)
1127 :extend t :inhert (default))))) 1163 :extend t :inhert (default)))))
1128 (:hook #'visual-line-mode 1164 (:hook #'visual-line-mode
1129 #'enable-lui-track 1165 #'enable-lui-track
1130 #'visual-fill-column-mode 1166 #'visual-fill-column-mode
@@ -1300,9 +1336,9 @@ They are completed by \"M-x TAB\" only in Tramp debug buffers."
1300 (:hook #'turn-off-+key-mode) 1336 (:hook #'turn-off-+key-mode)
1301 (:option crossword-save-path (sync/ "emacs/crosswords/" t) 1337 (:option crossword-save-path (sync/ "emacs/crosswords/" t)
1302 crossword-empty-position-char "=") 1338 crossword-empty-position-char "=")
1303 (:face crossword-grid-face ((t :inherit 'font-lock-string-face)) 1339 (:face 'crossword-grid-face '((t :inherit 'font-lock-string-face))
1304 crossword-current-face ((t :inherit 'highlight)) 1340 'crossword-current-face '((t :inherit 'highlight))
1305 crossword-other-dir-face ((t :inherit 'font-lock-keyword-face)))) 1341 'crossword-other-dir-face '((t :inherit 'font-lock-keyword-face))))
1306 1342
1307(setup (:straight crux) 1343(setup (:straight crux)
1308 ;; yes it's silly I have an addon to this addon. 1344 ;; yes it's silly I have an addon to this addon.
@@ -1527,7 +1563,7 @@ See also `crux-reopen-as-root-mode'."
1527(setup (:straight (filldent 1563(setup (:straight (filldent
1528 :host github 1564 :host github
1529 :repo "duckwork/filldent.el")) 1565 :repo "duckwork/filldent.el"))
1530 (:+key "M-q" #'filldent-dwim)) 1566 (:+key "M-q" #'filldent-unfill-toggle))
1531 1567
1532(setup (:straight (flymake-collection 1568(setup (:straight (flymake-collection
1533 :host github 1569 :host github
@@ -1546,8 +1582,23 @@ See also `crux-reopen-as-root-mode'."
1546 (with-eval-after-load 'vertico-multiform 1582 (with-eval-after-load 'vertico-multiform
1547 (setf (alist-get 'flyspell vertico-multiform-categories) nil))) 1583 (setf (alist-get 'flyspell vertico-multiform-categories) nil)))
1548 1584
1585(setup (:straight focus)
1586 (:require)
1587 (add-hook 'modus-themes-after-load-theme-hook
1588 (defun focus-update@after-modus-load ()
1589 (modus-themes-with-colors
1590 (:face 'focus-unfocused `((t ( :foreground ,fg-inactive
1591 :background ,bg-inactive
1592 :weight normal
1593 :slant normal
1594 :extend t)))))))
1595 ;; XXX: This doesn't work, because notmuch overlays shit on the buffer
1596 (setf (alist-get 'notmuch-show-mode focus-mode-to-thing)
1597 'notmuch-message)
1598 (:hook-into notmuch-show-mode))
1599
1549(setup (:straight (forge 1600(setup (:straight (forge
1550 :host github :repo "magit/forge") 1601 :host github :repo "magit/forge")
1551 (eq system-type 'gnu/linux)) 1602 (eq system-type 'gnu/linux))
1552 (require 'forge) 1603 (require 'forge)
1553 (add-to-list 'forge-alist 1604 (add-to-list 'forge-alist
@@ -1578,7 +1629,9 @@ See also `crux-reopen-as-root-mode'."
1578 (:straight scheme-complete) 1629 (:straight scheme-complete)
1579 (:require +chicken) 1630 (:require +chicken)
1580 (setf (alist-get "\\.scm\\'" auto-mode-alist nil nil #'string=) 1631 (setf (alist-get "\\.scm\\'" auto-mode-alist nil nil #'string=)
1581 'scheme-mode)) 1632 'scheme-mode)
1633 (setf (alist-get "\\.scm\\'" auto-mode-alist nil nil #'string=)
1634 '(insert "#!/bin/sh\n#| -*- scheme -*-\nexec csi -s $0 \"$@\"\n|#\n")))
1582 1635
1583(setup (:straight (git-modes 1636(setup (:straight (git-modes
1584 :host github :repo "magit/git-modes")) 1637 :host github :repo "magit/git-modes"))
@@ -1678,9 +1731,9 @@ See also `crux-reopen-as-root-mode'."
1678 :host nil))) 1731 :host nil)))
1679 (:also-load +jabber) 1732 (:also-load +jabber)
1680 (:option jabber-account-list '(("acdw@hmm.st")) 1733 (:option jabber-account-list '(("acdw@hmm.st"))
1681 jabber-groupchat-buffer-format "xmpp:%n" 1734 jabber-groupchat-buffer-format "X:%n"
1682 jabber-chat-buffer-format "xmpp:%n" 1735 jabber-chat-buffer-format "X:%n"
1683 jabber-muc-private-buffer-format "xmpp:%n(%g)" 1736 jabber-muc-private-buffer-format "X:%n(%g)"
1684 jabber-activity-show-p #'ignore 1737 jabber-activity-show-p #'ignore
1685 jabber-muc-decorate-presence-patterns 1738 jabber-muc-decorate-presence-patterns
1686 '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$") 1739 '(("\\( enters the room ([^)]+)\\| has left the chatroom\\)$")
@@ -1805,7 +1858,7 @@ See also `crux-reopen-as-root-mode'."
1805 :fork (:host github :repo "duckwork/mode-line-bell" 1858 :fork (:host github :repo "duckwork/mode-line-bell"
1806 :branch "remap-face"))) 1859 :branch "remap-face")))
1807 ;; This is still, annoyingly, not quite working right. 1860 ;; This is still, annoyingly, not quite working right.
1808 (:face mode-line-bell ((t (:inherit mode-line-highlight)))) 1861 (:face 'mode-line-bell '((t (:inherit mode-line-highlight))))
1809 (:option mode-line-bell-flash-time 0.1) 1862 (:option mode-line-bell-flash-time 0.1)
1810 (mode-line-bell-mode +1)) 1863 (mode-line-bell-mode +1))
1811 1864
@@ -1813,11 +1866,10 @@ See also `crux-reopen-as-root-mode'."
1813 :host gitlab 1866 :host gitlab
1814 :repo "protesilaos/modus-themes")) 1867 :repo "protesilaos/modus-themes"))
1815 (require 'modus-themes (.etc "straight/build/modus-themes/modus-themes")) 1868 (require 'modus-themes (.etc "straight/build/modus-themes/modus-themes"))
1816 (:also-load dawn)
1817 (:option modus-themes-mixed-fonts t 1869 (:option modus-themes-mixed-fonts t
1818 modus-themes-bold-constructs t 1870 modus-themes-bold-constructs t
1819 modus-themes-italic-constructs t 1871 modus-themes-italic-constructs t
1820 modus-themes-headings '((t . (background regular rainbow)))) 1872 modus-themes-headings '((t t)))
1821 (dotimes (facen-1 8) 1873 (dotimes (facen-1 8)
1822 (let ((facen (1+ facen-1))) 1874 (let ((facen (1+ facen-1)))
1823 (custom-set-faces 1875 (custom-set-faces
@@ -1826,9 +1878,16 @@ See also `crux-reopen-as-root-mode'."
1826 (,(intern (format "modus-themes-heading-%s" facen)) 1878 (,(intern (format "modus-themes-heading-%s" facen))
1827 fixed-pitch)) 1879 fixed-pitch))
1828 :now))))) 1880 :now)))))
1829 (:face modus-themes-tab-active ((t :bold nil)) 1881 (:face 'modus-themes-tab-active '((t :bold nil))
1830 modus-themes-tab-inactive ((t :italic t))) 1882 'modus-themes-tab-inactive '((t :italic t)))
1883
1884 ;; Fix a "nil is not a Modus theme" error
1885 ;; XXX: Need to register a bug report
1886 (define-advice modus-themes--current-theme (:around (fn &rest r))
1887 (or (apply fn r)
1888 'modus-operandi))
1831 1889
1890 ;; This needs to be after the themes are loaded, I think.
1832 (add-hook 'modus-themes-after-load-theme-hook 1891 (add-hook 'modus-themes-after-load-theme-hook
1833 (defun +modus-themes-mostly-monochrome () 1892 (defun +modus-themes-mostly-monochrome ()
1834 "Set up mdous-themes to be mostly monochrome." 1893 "Set up mdous-themes to be mostly monochrome."
@@ -1862,6 +1921,7 @@ See also `crux-reopen-as-root-mode'."
1862 :foreground ,fg-header 1921 :foreground ,fg-header
1863 :background ,yellow-intense-bg))))))) 1922 :background ,yellow-intense-bg)))))))
1864 1923
1924 (require 'dawn)
1865 (dawn-schedule #'modus-themes-load-operandi 1925 (dawn-schedule #'modus-themes-load-operandi
1866 #'modus-themes-load-vivendi)) 1926 #'modus-themes-load-vivendi))
1867 1927
@@ -1915,6 +1975,12 @@ See also `crux-reopen-as-root-mode'."
1915 (:else 'url-retrieve))) 1975 (:else 'url-retrieve)))
1916 (add-hook 'dired-mode-hook 'org-download-enable)) 1976 (add-hook 'dired-mode-hook 'org-download-enable))
1917 1977
1978(setup (:straight (org-drawer-list
1979 :host github
1980 :repo "d12frosted/org-drawer-list"))
1981 (:load-after org)
1982 (:also-load +org-drawer-list))
1983
1918(setup (:straight org-mime) 1984(setup (:straight org-mime)
1919 (:option org-mime-export-ascii 'utf-8) 1985 (:option org-mime-export-ascii 'utf-8)
1920 (add-hook 'message-mode-hook 1986 (add-hook 'message-mode-hook
@@ -1924,9 +1990,19 @@ See also `crux-reopen-as-root-mode'."
1924 (defun org-mime-setup@org-mode () 1990 (defun org-mime-setup@org-mode ()
1925 (local-set-key (kbd "C-c M-o") 'org-mime-org-buffer-htmlize)))) 1991 (local-set-key (kbd "C-c M-o") 'org-mime-org-buffer-htmlize))))
1926 1992
1927(setup (:straight org-sticky-header) 1993(setup (:straight org-modern)
1928 ;; (:hook-into org-mode) 1994 (:option org-modern-hide-stars nil
1929 ) 1995 org-modern-star nil
1996 org-modern-list nil)
1997 (:face 'org-modern-label '((t ( :height 1.0
1998 :weight regular
1999 :underline nil
2000 :inherit fixed-pitch))))
2001 (advice-add 'org-modern--update-label-face :override #'ignore)
2002 (:hook-into org-mode))
2003
2004(setup (:straight org-sticky-header) (:quit)
2005 (:hook-into org-mode))
1930 2006
1931(setup (:straight (org-taskwise 2007(setup (:straight (org-taskwise
1932 :host github 2008 :host github
@@ -2008,6 +2084,8 @@ See also `crux-reopen-as-root-mode'."
2008(setup (:straight rainbow-mode) 2084(setup (:straight rainbow-mode)
2009 (:hook-into prog-mode)) 2085 (:hook-into prog-mode))
2010 2086
2087(setup (:straight restart-emacs))
2088
2011(setup (:straight (shell-command+ 2089(setup (:straight (shell-command+
2012 :host nil 2090 :host nil
2013 :repo "https://git.sr.ht/~pkal/shell-command-plus")) 2091 :repo "https://git.sr.ht/~pkal/shell-command-plus"))
@@ -2027,14 +2105,10 @@ See also `crux-reopen-as-root-mode'."
2027 (readonly . "=") 2105 (readonly . "=")
2028 (modified . "+") 2106 (modified . "+")
2029 (t . "-")) 2107 (t . "-"))
2030 ;; '((ephemeral . "🥞")
2031 ;; (special . "🥐")
2032 ;; (readonly . "🦞")
2033 ;; (modified . "🥪")
2034 ;; (t . "🍞"))
2035
2036 +modeline-minions-icon ";" 2108 +modeline-minions-icon ";"
2037 simple-modeline-segments 2109 +modeline-buffer-name-max-length 0.35)
2110 ;; Segments
2111 (:option simple-modeline-segments
2038 `(( ; left 2112 `(( ; left
2039 +modeline-ace-window-display 2113 +modeline-ace-window-display
2040 +modeline-modified 2114 +modeline-modified
@@ -2060,10 +2134,7 @@ See also `crux-reopen-as-root-mode'."
2060 +modeline-narrowed) 2134 +modeline-narrowed)
2061 ",") 2135 ",")
2062 +modeline-input-method 2136 +modeline-input-method
2063 ,(+modeline-concat 2137 +modeline-position
2064 '(+modeline-region
2065 +modeline-line-column
2066 +modeline-file-percentage))
2067 ))) 2138 )))
2068 (simple-modeline-mode +1)) 2139 (simple-modeline-mode +1))
2069 2140
@@ -2314,7 +2385,9 @@ See also `crux-reopen-as-root-mode'."
2314 "https://invidious.snopyta.org")) 2385 "https://invidious.snopyta.org"))
2315 (:bind "y" #'+ytdious-watch)) 2386 (:bind "y" #'+ytdious-watch))
2316 2387
2317(setup (:straight zoom-frm)) 2388(setup (:straight zoom-frm)
2389 (:+key "M-+" #'zoom-frm-in
2390 "M-_" #'zoom-frm-out))
2318 2391
2319(setup (:straight zzz-to-char) 2392(setup (:straight zzz-to-char)
2320 (:require +zzz-to-char) 2393 (:require +zzz-to-char)