mu4e init

This commit is contained in:
Sakooooo 2024-07-13 20:58:02 +04:00
parent 6db376ddd6
commit d110c3085d
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -338,74 +338,76 @@ kept-old-versions 5)
** Evil ** Evil
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package evil (use-package evil
:init :init
;; Pre-load configuration ;; Pre-load configuration
(setq evil-want-integration t) (setq evil-want-integration t)
(setq evil-want-keybinding nil) (setq evil-want-keybinding nil)
(setq evil-want-C-u-scroll t) (setq evil-want-C-u-scroll t)
(setq evil-want-C-i-jump nil) (setq evil-want-C-i-jump nil)
(setq evil-respect-visual-line-mode t) (setq evil-respect-visual-line-mode t)
(setq evil-undo-system 'undo-tree) (setq evil-undo-system 'undo-tree)
:config :config
(evil-mode 1) (evil-mode 1)
;; use emacs state for these mods ;; use emacs state for these mods
(dolist (mode '(custom-mode (dolist (mode '(custom-mode
eshell-mode eshell-mode
git-rebase-mode git-rebase-mode
erc-mode erc-mode
circe-server-mode circe-server-mode
circe-chat-mode circe-chat-mode
circe-query-mode circe-query-mode
term-mode)) term-mode))
(add-to-list 'evil-emacs-state-modes mode)) (add-to-list 'evil-emacs-state-modes mode))
(defun sk/dont-arrow-me-bro () (defun sk/dont-arrow-me-bro ()
(interactive) (interactive)
(message "STOP USING THE ARROW KEYS!!!!!!!!!!!!!!!!!!!!!!!")) (message "STOP USING THE ARROW KEYS!!!!!!!!!!!!!!!!!!!!!!!"))
;; Disable arrow keys in normal and visual modes ;; Disable arrow keys in normal and visual modes
(define-key evil-normal-state-map (kbd "<left>") 'sk/dont-arrow-me-bro) (define-key evil-normal-state-map (kbd "<left>") 'sk/dont-arrow-me-bro)
(define-key evil-normal-state-map (kbd "<right>") 'sk/dont-arrow-me-bro) (define-key evil-normal-state-map (kbd "<right>") 'sk/dont-arrow-me-bro)
(define-key evil-normal-state-map (kbd "<down>") 'sk/dont-arrow-me-bro) (define-key evil-normal-state-map (kbd "<down>") 'sk/dont-arrow-me-bro)
(define-key evil-normal-state-map (kbd "<up>") 'sk/dont-arrow-me-bro) (define-key evil-normal-state-map (kbd "<up>") 'sk/dont-arrow-me-bro)
(evil-global-set-key 'motion (kbd "<left>") 'sk/dont-arrow-me-bro) (evil-global-set-key 'motion (kbd "<left>") 'sk/dont-arrow-me-bro)
(evil-global-set-key 'motion (kbd "<right>") 'sk/dont-arrow-me-bro) (evil-global-set-key 'motion (kbd "<right>") 'sk/dont-arrow-me-bro)
(evil-global-set-key 'motion (kbd "<down>") 'sk/dont-arrow-me-bro) (evil-global-set-key 'motion (kbd "<down>") 'sk/dont-arrow-me-bro)
(evil-global-set-key 'motion (kbd "<up>") 'sk/dont-arrow-me-bro) (evil-global-set-key 'motion (kbd "<up>") 'sk/dont-arrow-me-bro)
(evil-set-initial-state 'messages-buffer-mode 'normal) (evil-set-initial-state 'messages-buffer-mode 'normal)
(evil-set-initial-state 'dashboard-mode 'normal)) (evil-set-initial-state 'dashboard-mode 'normal))
(use-package evil-collection (use-package evil-collection
:after evil :after evil
:custom :custom
(evil-collection-outline-bind-tab-p nil) (evil-collection-outline-bind-tab-p nil)
:config :config
;; Is this a bug in evil-collection? ;; Is this a bug in evil-collection?
(setq evil-collection-company-use-tng nil) (setq evil-collection-company-use-tng nil)
(delete 'lispy evil-collection-mode-list) (delete 'lispy evil-collection-mode-list)
(delete 'org-present evil-collection-mode-list) (delete 'org-present evil-collection-mode-list)
(evil-collection-init)) (delete 'mu4e evil-collection-mode-list)
(delete 'mu4e-conversation evil-collection-mode-list)
(evil-collection-init))
(use-package evil-org (use-package evil-org
:after (evil org) :after (evil org)
:hook ((org-mode . evil-org-mode) :hook ((org-mode . evil-org-mode)
(org-agenda-mode . evil-org-mode)) (org-agenda-mode . evil-org-mode))
:config :config
(require 'evil-org-agenda) (require 'evil-org-agenda)
(evil-org-set-key-theme '(navigation todo insert textobjects additional)) (evil-org-set-key-theme '(navigation todo insert textobjects additional))
(evil-org-agenda-set-keys)) (evil-org-agenda-set-keys))
(use-package evil-nerd-commenter (use-package evil-nerd-commenter
:bind ("M-/" . evilnc-comment-or-uncomment-lines)) :bind ("M-/" . evilnc-comment-or-uncomment-lines))
(with-eval-after-load 'org (with-eval-after-load 'org
(evil-define-key '(normal insert visual) org-mode-map (kbd "C-j") 'org-next-visible-heading) (evil-define-key '(normal insert visual) org-mode-map (kbd "C-j") 'org-next-visible-heading)
(evil-define-key '(normal insert visual) org-mode-map (kbd "C-k") 'org-previous-visible-heading) (evil-define-key '(normal insert visual) org-mode-map (kbd "C-k") 'org-previous-visible-heading)
(evil-define-key '(normal insert visual) org-mode-map (kbd "M-j") 'org-metadown) (evil-define-key '(normal insert visual) org-mode-map (kbd "M-j") 'org-metadown)
(evil-define-key '(normal insert visual) org-mode-map (kbd "M-k") 'org-metaup)) (evil-define-key '(normal insert visual) org-mode-map (kbd "M-k") 'org-metaup))
#+end_src #+end_src
* Interface * Interface
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -999,6 +1001,36 @@ its over the machines took over guys can i get my likes now
:stream t :stream t
:models '("mistral:latest"))) :models '("mistral:latest")))
#+end_src #+end_src
** mu4e
GNU patch review metho dor sometihng idk
#+begin_src emacs-lisp
(use-package mu4e
:config
;; mu4e syncing issue with isync
(setq mu4e-change-filenames-when-moving t)
(setq mu4e-update-interval (* 10 60))
(setq mu4e-get-mail-command "mbsync -a")
(setq mu4e-maildir "~/Mail")
(setq mu4e-contexts
(list
;; outlook
(make-mu4e-context
:name "Outlook"
:match-func
(lambda (msg)
(when msg
(string-prefix-p "/Outlook" (mu4e-message-field msg :maildir))))
:vars `((user-mail-address . (shell-command-to-string "pass Microsoft | awk 'FNR == 2{gsub(\"login: \", \"\"); gsub(/ /, \"\"); print}'"))
(user-full-name . "Sako")
(mu4e-drafts-folder . "/Outlook/Drafts")
(mu4e-sent-folder . "/Outlook/Sent")
(mu4e-refile-folder . "/Outlook/Inbox")
(mu4e-trash-folder . "/Outlook/Deleted")))))
)
#+end_src
* Org * Org
#+begin_src emacs-lisp #+begin_src emacs-lisp
(message "Reached Org") (message "Reached Org")