I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.9 KiB

4 years ago
  1. (use-package mu4e
  2. :load-path "/usr/share/emacs/site-lisp/mu4e"
  3. :custom (mu4e-maildir "~/.cache/mail")
  4. (mu4e-update-interval (* 5 60))
  5. (mu4e-get-mail-command "mbsync -a")
  6. (mu4e-compose-format-flowed t)
  7. (mu4e-change-filenames-when-moving t)
  8. (message-send-mail-function 'smtpmail-send-it)
  9. (mml-secure-openpgp-signers '("37AB1CB72B741E478CA026D43025DCBD46F81C0F"))
  10. (mu4e-compose-signature (concat "Chris Hayward\n"
  11. "https://chrishayward.xyz\n"))
  12. :config
  13. (add-hook 'message-send-hook 'mml-secure-message-sign-pgpmime)
  14. (setq mu4e-contexts
  15. (list
  16. ;; Main
  17. ;; chris@chrishayward.xyz
  18. (make-mu4e-context
  19. :name "Main"
  20. :match-func
  21. (lambda (msg)
  22. (when msg
  23. (string-prefix-p "/Main" (mu4e-message-field msg :maildir))))
  24. :vars
  25. '((user-full-name . "Christopher James Hayward")
  26. (user-mail-address . "chris@chrishayward.xyz")
  27. (smtpmail-smtp-server . "mail.chrishayward.xyz")
  28. (smtpmail-smtp-service . 587)
  29. (smtpmail-stream-type . starttls))))))
  30. (use-package mu4e-alert
  31. :custom (mu4e-alert-set-default-style 'libnotify)
  32. :config (mu4e-alert-enable-notifications)
  33. (mu4e-alert-enable-mode-line-display))
  34. (dotfiles/leader
  35. "m" '(mu4e :which-key "Mail"))
  36. (setenv "BROWSER" dotfiles/browser)
  37. ;; (dotfiles/leader
  38. ;; "b" '(dotfiles/run-in-background dotfiles/browser :which-key "Browser"))
  39. (defun dotfiles/run (command)
  40. "Run an external process."
  41. (interactive (list (read-shell-command "λ ")))
  42. (start-process-shell-command command nil command))
  43. (defun dotfiles/run-in-background (command)
  44. (let ((command-parts (split-string command "[ ]+")))
  45. (apply #'call-process `(,(car command-parts) nil 0 nil ,@(cdr command-parts)))))
  46. (dotfiles/leader
  47. "x" '(:ignore t :which-key "Run")
  48. "xx" '(dotfiles/run :which-key "Run")
  49. "xz" '(async-shell-command :which-key "Async"))
  50. (defun dotfiles/init-hook ()
  51. (exwm-workspace-switch-create 1)
  52. (setq display-time-and-date t)
  53. (display-battery-mode 1)
  54. (display-time-mode 1))
  55. (defun dotfiles/update-display ()
  56. (dotfiles/run-in-background "autorandr --change --force"))
  57. (use-package exwm
  58. :custom (exwm-input-prefix-keys
  59. '(?\M-x
  60. ?\C-g
  61. ?\C-\ ))
  62. (exwm-input-global-keys
  63. `(([?\s-r] . exwm-reset)
  64. ,@(mapcar (lambda (i)
  65. `(,(kbd (format "s-%d" i)) .
  66. (lambda ()
  67. (interactive)
  68. (exwm-workspace-switch-create ,i))))
  69. (number-sequence 1 9))))
  70. :config (require 'exwm-randr)
  71. (exwm-randr-enable)
  72. (add-hook 'exwm-init-hook #'dotfiles/init-hook)
  73. (add-hook 'exwm-randr-screen-change-hook #'dotfiles/update-display)
  74. (dotfiles/update-display)
  75. (exwm-enable))