mirror of
				https://github.com/librephoenix/nixos-config
				synced 2025-11-04 09:54:00 +05:30 
			
		
		
		
	Massive mu4e config improvements!
This commit is contained in:
		
							parent
							
								
									cb3023d6f4
								
							
						
					
					
						commit
						afb0640955
					
				
					 2 changed files with 38 additions and 14 deletions
				
			
		| 
						 | 
					@ -1226,13 +1226,25 @@ https://github.com/magit/magit/issues/460 (@cpitclaudel)."
 | 
				
			||||||
(map! :map 'mu4e-view-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index)
 | 
					(map! :map 'mu4e-view-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index)
 | 
				
			||||||
(map! :map 'mu4e-view-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply)
 | 
					(map! :map 'mu4e-view-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply)
 | 
				
			||||||
(map! :map 'mu4e-headers-mode-map :desc "Archive message" :ge "e" #'mu4e-view-mark-for-refile)
 | 
					(map! :map 'mu4e-headers-mode-map :desc "Archive message" :ge "e" #'mu4e-view-mark-for-refile)
 | 
				
			||||||
(setq mu4e-headers-fields
 | 
					(after! mu4e
 | 
				
			||||||
  '((:account-stripe . 1)
 | 
					  (add-to-list 'mu4e-header-info-custom
 | 
				
			||||||
   (:human-date . 12)
 | 
					    '(:maildir-folder-no-account .
 | 
				
			||||||
   (:flags . 6)
 | 
					       ( :name "Maildir folder without account"  ;; long name, as seen in the message-view
 | 
				
			||||||
   (:maildir . 30)
 | 
					         :shortname "Folder"           ;; short name, as seen in the headers view
 | 
				
			||||||
   (:from-or-to . 20)
 | 
					         :help "Name of the subfolder without the maildir" ;; tooltip
 | 
				
			||||||
   (:subject)))
 | 
					         :function (lambda (msg) (substring (mu4e-message-field msg :maildir) (+ 2 (length (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )))))))))
 | 
				
			||||||
 | 
					  (add-to-list 'mu4e-bookmarks
 | 
				
			||||||
 | 
					    '( :name  "Unified inbox"
 | 
				
			||||||
 | 
					       :query "maildir://.*/INBOX/"
 | 
				
			||||||
 | 
					       :key   ?i))
 | 
				
			||||||
 | 
					    (setq mu4e-headers-fields
 | 
				
			||||||
 | 
					      '((:account-stripe . 1)
 | 
				
			||||||
 | 
					       (:account . 25)
 | 
				
			||||||
 | 
					       (:human-date . 12)
 | 
				
			||||||
 | 
					       (:flags . 6)
 | 
				
			||||||
 | 
					       (:from-or-to . 20)
 | 
				
			||||||
 | 
					       (:maildir-folder-no-account . 30)
 | 
				
			||||||
 | 
					     (:subject))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; TODO fix my make-mu4e-context wrapper
 | 
					;; TODO fix my make-mu4e-context wrapper
 | 
				
			||||||
;;(defun my-make-mu4e-context (context-name address catch-address full-name organization-name signature org-roam-db)
 | 
					;;(defun my-make-mu4e-context (context-name address catch-address full-name organization-name signature org-roam-db)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1447,13 +1447,25 @@ I don't have this active right now since it's kinda weird with pgtk...
 | 
				
			||||||
(map! :map 'mu4e-view-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index)
 | 
					(map! :map 'mu4e-view-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index)
 | 
				
			||||||
(map! :map 'mu4e-view-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply)
 | 
					(map! :map 'mu4e-view-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply)
 | 
				
			||||||
(map! :map 'mu4e-headers-mode-map :desc "Archive message" :ge "e" #'mu4e-view-mark-for-refile)
 | 
					(map! :map 'mu4e-headers-mode-map :desc "Archive message" :ge "e" #'mu4e-view-mark-for-refile)
 | 
				
			||||||
(setq mu4e-headers-fields
 | 
					(after! mu4e
 | 
				
			||||||
  '((:account-stripe . 1)
 | 
					  (add-to-list 'mu4e-header-info-custom
 | 
				
			||||||
   (:human-date . 12)
 | 
					    '(:maildir-folder-no-account .
 | 
				
			||||||
   (:flags . 6)
 | 
					       ( :name "Maildir folder without account"  ;; long name, as seen in the message-view
 | 
				
			||||||
   (:maildir . 30)
 | 
					         :shortname "Folder"           ;; short name, as seen in the headers view
 | 
				
			||||||
   (:from-or-to . 20)
 | 
					         :help "Name of the subfolder without the maildir" ;; tooltip
 | 
				
			||||||
   (:subject)))
 | 
					         :function (lambda (msg) (substring (mu4e-message-field msg :maildir) (+ 2 (length (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )))))))))
 | 
				
			||||||
 | 
					  (add-to-list 'mu4e-bookmarks
 | 
				
			||||||
 | 
					    '( :name  "Unified inbox"
 | 
				
			||||||
 | 
					       :query "maildir://.*/INBOX/"
 | 
				
			||||||
 | 
					       :key   ?i))
 | 
				
			||||||
 | 
					    (setq mu4e-headers-fields
 | 
				
			||||||
 | 
					      '((:account-stripe . 1)
 | 
				
			||||||
 | 
					       (:account . 25)
 | 
				
			||||||
 | 
					       (:human-date . 12)
 | 
				
			||||||
 | 
					       (:flags . 6)
 | 
				
			||||||
 | 
					       (:from-or-to . 20)
 | 
				
			||||||
 | 
					       (:maildir-folder-no-account . 30)
 | 
				
			||||||
 | 
					     (:subject))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; TODO fix my make-mu4e-context wrapper
 | 
					;; TODO fix my make-mu4e-context wrapper
 | 
				
			||||||
;;(defun my-make-mu4e-context (context-name address catch-address full-name organization-name signature org-roam-db)
 | 
					;;(defun my-make-mu4e-context (context-name address catch-address full-name organization-name signature org-roam-db)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue