From 4725492a7df61206db23acb05089a256b745c286 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Thu, 4 Sep 2025 13:33:30 +0700 Subject: [PATCH] emacs: better mu4e-get-mail-command, better daily entry capture, book subtitle, calfw junctions --- .config/emacs/init.org | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.config/emacs/init.org b/.config/emacs/init.org index 9aa3d1a..5dd4aab 100644 --- a/.config/emacs/init.org +++ b/.config/emacs/init.org @@ -375,7 +375,7 @@ Use Dashboard.el. First load `all-the-icons` for nicer rendering ;; (add-hook 'prog-mode-hook 'olivetti-mode) (defun joe/toggle-olivetti-based-on-width () (when (derived-mode-p 'prog-mode) - (if (> (window-total-width) 120) + (if (> (window-total-width) 140) (olivetti-mode 1) (olivetti-mode -1)))) @@ -1079,6 +1079,8 @@ Harpoon lets you quickly switch between bookmarked buffers #+begin_src emacs-lisp (add-hook 'after-init-hook (lambda () (winner-mode t))) +;; (setq display-buffer-alist nil) + (setq joe/popper-side-toggle 'right) (defun joe/window-split-vertical () (interactive) (set 'joe/popper-side-toggle 'right)) (defun joe/window-split-horizontal () (interactive) (set 'joe/popper-side-toggle 'below)) @@ -1847,7 +1849,7 @@ odd looking ~'(t .t)~ is for specifying a default for all other actions. (add-to-list 'auto-mode-alist '("authinfo" . authinfo-mode)) - (setq mu4e-get-mail-command "parallel mbsync -V \"-c ~/.config/mbsync/config\" ::: ferano.io gmail") + (setq mu4e-get-mail-command "parallel -j9 mbsync -V -c ~/.config/mbsync/config ::: ferano.io-inbox ferano.io-drafts ferano.io-sent ferano.io-junk ferano.io-trash gmail-inbox gmail-drafts gmail-sent gmail-trash") ;;; Sending email (SMTP) (require 'smtpmail) @@ -2973,6 +2975,7 @@ Org mode buffers have associated files. "*** Schedule\n" "*** Resources\n" "*** Notes")) + (setq org-capture-templates `( ("e" "Emacs Improvement" entry @@ -2983,16 +2986,18 @@ Org mode buffers have associated files. (function ,(lambda () (find-file (joe/capture-leetcode-newfile)))) #'joe/capture-leetcode-template) - ("d" "Daily Entry" entry + ("d" "Daily Entry" plain (file "Daily.org") - #'joe/capture-daily) + (function ,(lambda () + (with-temp-buffer + (insert-file-contents "~/Notes/Daily.txt") + (buffer-string))))) ("b" "New Book To Read" entry (file+headline "Books.org" "To Read") - "** %^{Book Title}%^{AUTHOR}p" :prepend t))) + "** %^{Book Title}%^{AUTHOR}p%^{SUBTITLE}p" :prepend t))) (define-key global-map (kbd "C-c c") #'org-capture) - #+end_src *** org-babel #+begin_src emacs-lisp @@ -3066,6 +3071,19 @@ with the cursor you hit TAB and you complete the following; (require 'org-kanban) #+end_src ** Calendar + +#+begin_src emacs-lisp +(require 'calfw) +(setq cfw:fchar-junction ?╋ + cfw:fchar-vertical-line ?┃ + cfw:fchar-horizontal-line ?━ + cfw:fchar-left-junction ?┣ + cfw:fchar-right-junction ?┫ + cfw:fchar-top-junction ?┯ + cfw:fchar-top-left-corner ?┏ + cfw:fchar-top-right-corner ?┓) +#+end_src + #+begin_src emacs-lisp (require 'cl) (require 'calendar)