From 44763014be76425dbfdc309e6766df1fca40db2b Mon Sep 17 00:00:00 2001 From: Joe Date: Sun, 21 Aug 2022 19:17:20 +0200 Subject: update --- .config/emacs/init.el | 2 +- .config/emacs/org/config.org | 100 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 1 deletion(-) (limited to '.config/emacs') diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 65b2b2a..3b5fbe8 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -39,7 +39,7 @@ '(jdee-db-spec-breakpoint-face-colors (cons "#1c1f2b" "#676E95")) '(objed-cursor-color "#ff5370") '(package-selected-packages - '(evil-mu4e helm-fuzzy-find helm-fuzzier fuzzy fuzzy-finder neotree color-theme doom-modeline-now-playing treemacs-icons-dired edit-indirect yaml-mode lua-mode company-nginx company-fuzzy company-go company-shell helm-ag rainbow-identifiers nginx-mode evil-quickscope vc-fossil crontab-mode go-mode mutt-mode pacmacs gemini-mode org-evil glsl-mode vimrc-mode windresize evil evil-collection evil-leader evil-search-highlight-persist evil-mc evil-surround evil-ediff evil-visual-mark-mode evil-nerd-commenter evil-vimish-fold evil-numbers yasnippet yasnippet-classic-snippets yasnippet-snippets auto-yasnippet el-autoyas helm helm-xref helm-etags-plus helm-fuzzy helm-themes helm-make helm-projectile projectile company company-box which-key magit undo-tree shell-pop autopair paredit rainbow-delimiters color-identifiers-mode ibuffer-vc ibuffer-projectile eyebrowse diff-hl fzf font-utils restart-emacs string-utils dired-icon kaolin-themes doom-themes spacemacs-theme dashboard org-superstar toc-org pdf-tools dockerfile-mode web-mode ssh sudo-ext vimish-fold bind-key all-the-icons all-the-icons-dired all-the-icons-ibuffer)) + '(password-store-otp password-store evil-mu4e helm-fuzzy-find helm-fuzzier fuzzy fuzzy-finder neotree color-theme doom-modeline-now-playing treemacs-icons-dired edit-indirect yaml-mode lua-mode company-nginx company-fuzzy company-go company-shell helm-ag rainbow-identifiers nginx-mode evil-quickscope vc-fossil crontab-mode go-mode mutt-mode pacmacs gemini-mode org-evil glsl-mode vimrc-mode windresize evil evil-collection evil-leader evil-search-highlight-persist evil-mc evil-surround evil-ediff evil-visual-mark-mode evil-nerd-commenter evil-vimish-fold evil-numbers yasnippet yasnippet-classic-snippets yasnippet-snippets auto-yasnippet el-autoyas helm helm-xref helm-etags-plus helm-fuzzy helm-themes helm-make helm-projectile projectile company company-box which-key magit undo-tree shell-pop autopair paredit rainbow-delimiters color-identifiers-mode ibuffer-vc ibuffer-projectile eyebrowse diff-hl fzf font-utils restart-emacs string-utils dired-icon kaolin-themes doom-themes spacemacs-theme dashboard org-superstar toc-org pdf-tools dockerfile-mode web-mode ssh sudo-ext vimish-fold bind-key all-the-icons all-the-icons-dired all-the-icons-ibuffer)) '(pos-tip-background-color "#2E2A29") '(pos-tip-foreground-color "#d4d4d6") '(rustic-ansi-faces diff --git a/.config/emacs/org/config.org b/.config/emacs/org/config.org index 0ada552..6722a16 100644 --- a/.config/emacs/org/config.org +++ b/.config/emacs/org/config.org @@ -232,6 +232,7 @@ (evil-collection-init 'magit) (evil-collection-init 'flymake) (evil-collection-init 'neotree) + (evil-collection-init 'mu4e) (setq evil-emacs-state-cursor '("#b16286" box)) @@ -765,6 +766,105 @@ then it takes a second \\[keyboard-quit] to abort the minibuffer." (setq neo-window-width 35) #+END_SRC +*** mu4e +#+BEGIN_SRC emacs-lisp + (require 'mu4e) + (require 'org-mu4e) + (require 'mu4e-contrib) + (require 'smtpmail) + + (auth-source-pass-enable) + (setq auth-source-debug t) + (setq auth-source-do-cache nil) + (setq auth-sources '(password-store)) + (setq message-kill-buffer-on-exit t) + (setq message-send-mail-function 'smtpmail-send-it) + (setq mu4e-attachment-dir "~/dl") + (setq mu4e-change-filenames-when-moving t) + (setq mu4e-completing-read-function 'completing-read) + (setq mu4e-compose-complete-addresses t) + (setq mu4e-compose-context-policy nil) + (setq mu4e-compose-dont-reply-to-self t) + (setq mu4e-compose-keep-self-cc nil) + (setq mu4e-context-policy 'pick-first) + (setq mu4e-get-mail-command "mbsync -a -c ~/.config/mbsync/mbsyncrc") + (setq mu4e-headers-date-format "%d-%m-%Y %H:%M") + (setq mu4e-headers-fields '((:human-date . 20) + (:flags . 6) + (:mailing-list . 10) + (:from . 22) + (:subject))) + (setq mu4e-headers-include-related t) + (setq mu4e-sent-messages-behavior 'delete) + (setq mu4e-view-show-addresses t) + (setq mu4e-view-show-images t) + (setq smtpmail-debug-info t) + (setq smtpmail-stream-type 'starttls) + (setq mm-sign-option 'guided) + + (when (fboundp 'imagemagick-register-types) + (imagemagick-register-types)) + + (defun sign-or-encrypt-message () + (let ((answer (read-from-minibuffer "Sign or encrypt?\nEmpty to do nothing.\n[s/e]: "))) + (cond + ((string-equal answer "s") (progn + (message "Signing message.") + (mml-secure-message-sign-pgpmime))) + ((string-equal answer "e") (progn + (message "Encrypt and signing message.") + (mml-secure-message-encrypt-pgpmime))) + (t (progn + (message "Dont signing or encrypting message.") + nil))))) + + (add-hook 'message-send-hook 'sign-or-encrypt-message) + + (setq mu4e-contexts + `( ,(make-mu4e-context + :name "gmail" + :enter-func (lambda () + (mu4e-message "Entering gmail context") + (when (string-match-p (buffer-name (current-buffer)) "mu4e-main") + (revert-buffer))) + :leave-func (lambda () + (mu4e-message "Leaving gmail context") + (when (string-match-p (buffer-name (current-buffer)) "mu4e-main") + (revert-buffer))) + :match-func (lambda (msg) + (when msg + (or (mu4e-message-contact-field-matches msg :to "Rudy Bousset ") + (mu4e-message-contact-field-matches msg :from "Rudy Bousset ") + (mu4e-message-contact-field-matches msg :cc "Rudy Bousset ") + (mu4e-message-contact-field-matches msg :bcc "Rudy Bousset ") + (string-match-p "^/bousset.rudy@gmail.com/INBOX" (mu4e-message-field msg :maildir))))) + :vars '( ( user-mail-address . "bousset.rudy@gmail.com" ) + ( smtpmail-smtp-user . "bousset.rudy@gmail.com" ) + ( mu4e-compose-signature . "Rudy Bousset" ) + ( smtpmail-smtp-server . "smtp.gmail.com" ) + ( smtpmail-smtp-service . 587 ) + ( mu4e-maildir-shortcuts . ((:maildir "/bousset.rudy@gmail.com/INBOX" :key ?i))) + ( mu4e-bookmarks + . + (( :name "Unread messages" + :query "maildir:/bousset.rudy@gmail.com/INBOX AND flag:unread AND NOT flag:trashed AND NOT outdoorexperten" + :key ?u) + ( :name "Today's messages" + :query "maildir:/bousset.rudy@gmail.com/INBOX AND date:today..now" + :key ?t) + ( :name "Last 7 days" + :query "maildir:/bousset.rudy@gmail.com/INBOX AND date:7d..now" + :hide-unread t + :key ?w) + ( :name "Deleted" + :query "flag:trashed" + :key ?d) + ( :name "Possibly garbage" + :query "bokio OR outdoorexperten" + :key ?g))))) + )) +#+END_SRC + ** Custom funcs #+BEGIN_SRC emacs-lisp (defadvice text-scale-increase (around all-buffers (arg) activate) -- cgit v1.2.3