diff --git a/init.el b/init.el index 03c31be..d6d80d7 100644 --- a/init.el +++ b/init.el @@ -54,6 +54,9 @@ ;; Terminal mouse support (xterm-mouse-mode 1) + ;; Better mouse scrolling + (setq mouse-scroll-delay 0) + ;; Make show paren instant (setq show-paren-delay 0) (show-paren-mode 1) @@ -135,10 +138,12 @@ (evil-define-key '(normal visual motion) dired-mode-map "u" #'dired-unmark)) (use-package evil-collection + :after evil :diminish evil-collection-unimpaired-mode :config (evil-collection-init)) (use-package evil-surround + :after evil :config (evil-define-key 'operator evil-surround-mode-map "z" #'evil-surround-edit @@ -148,6 +153,7 @@ "g Z" #'evil-Surround-region) (global-evil-surround-mode 1)) (use-package evil-terminal-cursor-changer + :after evil :config (evil-terminal-cursor-changer-activate)) @@ -260,6 +266,8 @@ visual states." ("C-x c f" . consult-focus-lines) ("C-x c r" . consult-recent-file) ("C-x c b" . consult-bookmark) + ("C-x c d" . consult-fd) + ("C-x c g" . consult-ripgrep) ("M-g i" . consult-imenu) ("M-g I" . consult-imenu-multi) ("M-g r" . consult-imenu-multi)) @@ -407,6 +415,49 @@ visual states." "s" #'magit-stage-file "S" #'magit-stage-modified)) +;; mu4e +(add-to-list 'load-path "/usr/share/emacs/site-lisp/mu4e/") +(require 'mu4e) +(add-hook 'mu4e-index-updated-hook #'my/-mu4e-enable-index-messages) +(defun my/-mu4e-enable-index-messages () + (setq mu4e-hide-index-messages nil)) +(defun my/mu4e-update-mail-and-index-silent () + "Run `mu4e-update-mail-and-index' without any messages in the background." + (setq mu4e-hide-index-messages t) + (mu4e-update-mail-and-index t)) +(setq mu4e-change-filenames-when-moving t + mu4e-context-policy 'pick-first + mu4e-index-update-error-warning nil + mu4e-get-mail-command "mbsync protonmail" + mu4e-completing-read-function #'completing-read-default + mu4e-contexts + `(,(make-mu4e-context + :name "Personal" + :enter-func (lambda () (mu4e-message "Entered personal context")) + :match-func (lambda (msg) + (when msg + (string-match-p "^/protonmail/" + (mu4e-message-field msg + :maildir)))) + :vars `((user-mail-address . ,(auth-source-pass-get "email" "emacs/mu4e-protonmail")) + (user-full-name . ,(auth-source-pass-get "name" "emacs/mu4e-protonmail")) + (mu4e-compose-signature nil) + (mu4e-refile-folder . "/protonmail/Archive") + (mu4e-sent-folder . "/protonmail/Sent") + (mu4e-drafts-folder . "/protonmail/Drafts") + (mu4e-trash-folder . "/protonmail/Trash") + (mu4e-bookmarks . ((:name "Inbox" + :query "maildir:/protonmail/Inbox" + :key ?i) + (:name "Unread" + :query "flag:unread AND NOT flag:trashed AND NOT maildir:/protonmail/Spam" + :key ?u))))))) +(use-package mu4e-alert + :after mu4e + :hook (after-init . mu4e-alert-enable-notifications) + :config + (mu4e-alert-set-default-style 'libnotify)) + ;; rainbow-delimiters (use-package rainbow-delimiters :hook (prog-mode . rainbow-delimiters-mode))