Compare commits
13 commits
5dedb1a6f7
...
a6393b396b
Author | SHA1 | Date | |
---|---|---|---|
a6393b396b | |||
e11793460f | |||
e6ea557889 | |||
2855f2abc2 | |||
ddb05d56c1 | |||
16619a2f17 | |||
b4c15210ac | |||
0091dd84f0 | |||
de8850a14c | |||
47a59c031d | |||
6624ee7036 | |||
8bdaf26a0a | |||
93aa0934ca |
2 changed files with 40 additions and 102 deletions
138
config.org
138
config.org
|
@ -72,6 +72,15 @@ Use a sane date style.
|
|||
(setq-default backup-inhibited t)
|
||||
#+end_src
|
||||
|
||||
** Performance tweaks
|
||||
|
||||
As recommended by [[https://emacs-lsp.github.io/lsp-mode/page/performance/][lsp-mode]],
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq gc-cons-threshold 100000000
|
||||
read-process-output-max (* 1024 1024))
|
||||
#+end_src
|
||||
|
||||
** Disable adding double spaces after periods
|
||||
|
||||
Source: [[http://www.reddit.com/r/emacs/comments/2l5gtz/real_sentence_in_emacs/][Real sentence in Emacs : emacs]]
|
||||
|
@ -432,7 +441,7 @@ Installing and enabling Doom themes.
|
|||
Add a slight transparency to the frames. Code provided by David Wilson / System Crafters [[https://github.com/daviwil/emacs-from-scratch/blob/master/Emacs.org][Emacs from Scratch]] video series.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq mmk2410/frame-transparency '(95 . 95))
|
||||
(setq mmk2410/frame-transparency '(90 . 90))
|
||||
|
||||
(set-frame-parameter (selected-frame) 'alpha mmk2410/frame-transparency)
|
||||
(add-to-list 'default-frame-alist `(alpha . ,mmk2410/frame-transparency))
|
||||
|
@ -1051,7 +1060,7 @@ Configure refiling TODOs.
|
|||
(setq org-refile-use-outline-path 'file)
|
||||
(setq org-outline-path-complete-in-steps nil)
|
||||
(setq org-refile-allow-creating-parent-nodes 'confirm)
|
||||
(setq org-refile-targets '((org-agenda-files :maxlevel . 1)))
|
||||
(setq org-refile-targets '((org-agenda-files :maxlevel . 2)))
|
||||
#+end_src
|
||||
|
||||
Warn me on deadlines in the next year.
|
||||
|
@ -1465,6 +1474,7 @@ Source: [[https://github.com/emacs-lsp/lsp-mode][GitHub:emacs-lsp/lsp-mode]]
|
|||
(go-mode . lsp-deferred)
|
||||
(php-mode . lsp-deferred)
|
||||
(vue-mode . lsp-deferred)
|
||||
(web-mode . lsp-deferred)
|
||||
(typescript-mode . lsp-deferred)
|
||||
(js-mode . lsp-deferred)
|
||||
(lsp-mode . lsp-enable-which-key-integration))
|
||||
|
@ -1516,7 +1526,8 @@ Source: [[https://github.com/emacs-php/php-mode][GitHub: emacs-php/php-mode]]
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package php-mode
|
||||
:mode "\\.php\\'")
|
||||
:mode "\\.php\\'"
|
||||
:config (setq php-mode-coding-style 'PSR2))
|
||||
#+end_src
|
||||
|
||||
** TypeScript
|
||||
|
@ -1545,20 +1556,10 @@ Source: [[https://github.com/fxbois/web-mode][GitHub: fxbois/web-mode]]
|
|||
("\\.erb\\'" . web-mode)
|
||||
("\\.mustache\\'" . web-mode)
|
||||
("\\.djhtml\\'" . web-mode)
|
||||
("\\.vue\\'" . web-mode)
|
||||
("\\.blade\\.php\\'" . web-mode)))
|
||||
#+end_src
|
||||
|
||||
** Vue Mode
|
||||
|
||||
Emacs major mode for vue.js
|
||||
|
||||
Source: [[https://github.com/AdamNiederer/vue-mode][GitHub: AdamNiederer/vue-mode]]
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package vue-mode
|
||||
:mode "\\.vue\\'")
|
||||
#+end_src
|
||||
|
||||
** TypoScript
|
||||
|
||||
TypoScript major mode for Emacs.
|
||||
|
@ -1790,13 +1791,13 @@ Source: [[https://github.com/fasheng/elfeed-protocol][GitHub: fasheng/elfeed-pro
|
|||
:init
|
||||
;; FreshRSS (self-hosted)
|
||||
;; Disabled since I currently use Miniflux
|
||||
;; (setq elfeed-feeds '(("fever+https://mmk2410@rss.mmk2410.org"
|
||||
;; :api-url "https://rss.mmk2410.org/api/fever.php"
|
||||
;; :use-authinfo t)))
|
||||
;; Miniflux (self-hosted)
|
||||
(setq elfeed-feeds '(("fever+https://mmk2410@miniflux.rss.mmk2410.org"
|
||||
:api-url "https://miniflux.rss.mmk2410.org/fever/"
|
||||
(setq elfeed-feeds '(("fever+https://mmk2410@rss.mmk2410.org"
|
||||
:api-url "https://rss.mmk2410.org/api/fever.php"
|
||||
:use-authinfo t)))
|
||||
;; Miniflux (self-hosted)
|
||||
;; (setq elfeed-feeds '(("fever+https://mmk2410@miniflux.rss.mmk2410.org"
|
||||
;; :api-url "https://miniflux.rss.mmk2410.org/fever/"
|
||||
;; :use-authinfo t)))
|
||||
(elfeed-protocol-enable))
|
||||
#+end_src
|
||||
|
||||
|
@ -1806,12 +1807,14 @@ Managing e-mails is maybe one of the most critical tasks in my life. Over the la
|
|||
|
||||
Sadly since my workplace heavily uses Microsoft Office 365 including Outlook for mails I'm currently using Evolution, with a setup heavily inspired by [[https://karl-voit.at/2021/06/01/Thunderbird-to-Evolution/][Karl Voit]].
|
||||
|
||||
|
||||
** Load mu4e
|
||||
|
||||
Not all systems that I use have mu/mu4e installed. Either because I cannot really use it at work or because I'm running a native Windows instance or because I didn't completely setup the machine. Therefore I only load/execute the complete mu4e configuration if Emacs can find a =mu= executable.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(when (executable-find "mu") ;; Closed after all mu4e configuration
|
||||
(when (and (executable-find "mu")
|
||||
(not (string-equal system-name "knuth"))) ;; Closed after all mu4e configuration
|
||||
#+end_src
|
||||
|
||||
Not all distributions that I use have a enough up-to-date package of mu/maildir-utils in their repositories. Therefore on some system I compile and install it myself which ends in =/usr/local= instead of just =/usr.= Therefore I have a small function that finds the correct load-path for the mu4e package.
|
||||
|
@ -2119,6 +2122,16 @@ Finally the mu4e configuration is done! So lets close the parenthesis left open
|
|||
) ;; closing parens for (when (executable-find "mu")
|
||||
#+end_src
|
||||
|
||||
** Load work mail
|
||||
|
||||
Load new mail setup which includes support for work mail when running on my work machine.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(when (string-equal system-name "knuth")
|
||||
(push "~/.emacs.d/lisp" load-path)
|
||||
(require 'mmk2410-mail-setup))
|
||||
#+end_src
|
||||
|
||||
* Email with Evolution
|
||||
|
||||
Since my work place is using Microsoft Outlook for Email including its appointment features I sadly needed to switch away from mu4e to Evolution, as recommended by [[https://karl-voit.at/2021/06/01/Thunderbird-to-Evolution/][Karl Voit]]. Using [[https://github.com/novoid/dot-emacs/blob/master/config.org][his configuration]] as an inspiration and source I could setup the following workflow.
|
||||
|
@ -2181,84 +2194,11 @@ The following function from him takes care of the other way: bringing a message
|
|||
* Helpers
|
||||
** Tab Bar Setup
|
||||
|
||||
Since version 27 Emacs features a tab bar. In contrast to e.g. a browser a tab does not display just one file/buffer/window but an Emacs tab features an entire window configuration. Since I use Emacs not just for programming but (perhaps even mainly) for personal information management (including mail, agenda, journal, IRC and RSS) I had the idea to have one Emacs frame open with different tabs for all these things. Therefore I wrote a ~mmk2410/tab-bar-setup~ function (bound to =C-c f C-f=) creating the following setup:
|
||||
|
||||
- First tab: *Mail* with mu4e
|
||||
- Second tab: *Agenda / Journal* with an Org agenda on the left and an Org journal on the right
|
||||
- Third tab: *IRC* with ERC
|
||||
- Fourth tab: *RSS* with elfeed
|
||||
|
||||
This is accompanied with five helper functions to switch to the wished application in the correct tab and window.
|
||||
|
||||
|------------+-----------------------------------+------------|
|
||||
| *Applicaton* | *Command* | *Keybinding* |
|
||||
| Mail | ~mmk2410/tab-bar-switch-to-mail~ | =C-c f m= |
|
||||
| Agenda | ~mmk2410/tab-bar-switch-to-agenda~ | =C-c f a= |
|
||||
| Journal | ~mmk2410/tab-bar-switch-to-journal~ | =C-c f j= |
|
||||
| IRC | ~mmk2410/tab-bar-switch-to-irc~ | =C-c f i= |
|
||||
| RSS | ~mmk2410/tab-bar-switch-to-rss~ | =C-c f r= |
|
||||
|------------+-----------------------------------+------------|
|
||||
Since version 27 Emacs features a tab bar. In contrast to e.g. a browser a tab does not display just one file/buffer/window but an Emacs tab features an entire window configuration. Since I use Emacs not just for programming but (perhaps even mainly) for personal information management (including mail, agenda, journal, IRC and RSS) I had the idea to have one Emacs frame open with different tabs for all these things. Therefore I wrote a small package found in =packages/mmk2410-tab-bar-helpers.el= which I explain in a [[https://mmk2410.org/2022/02/11/using-emacs-tab-bar-mode/][dedicated blog post]].
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun mmk2410/tab-bar-setup ()
|
||||
"Enable tab bar and setup mu4e, Org Journal, Org Agenda and ERC."
|
||||
(interactive)
|
||||
(tab-bar-mode 1)
|
||||
;; Disabled since I'm currently not using mu4e that much (see Evolution Mail and mu4e setup).
|
||||
;; (tab-bar-rename-tab "Mail")
|
||||
;; (mu4e-context-switch :name "Private")
|
||||
;; (mu4e)
|
||||
;; (sit-for 1)
|
||||
;; (tab-bar-new-tab)
|
||||
(tab-bar-rename-tab "Agenda / Journal")
|
||||
(split-window-horizontally)
|
||||
(org-agenda nil "c")
|
||||
(sit-for 1)
|
||||
(other-window 1)
|
||||
(org-journal-open-current-journal-file)
|
||||
(sit-for 1)
|
||||
(tab-bar-new-tab)
|
||||
(tab-bar-rename-tab "IRC")
|
||||
(mmk2410/erc-connect)
|
||||
(sit-for 1)
|
||||
(switch-to-buffer "Libera.Chat")
|
||||
(tab-bar-new-tab)
|
||||
(tab-bar-rename-tab "RSS")
|
||||
(elfeed))
|
||||
|
||||
(defun mmk2410/tab-bar-switch-to-mail ()
|
||||
"Switch to mail tab."
|
||||
(interactive)
|
||||
(tab-bar-switch-to-tab "Mail"))
|
||||
|
||||
(defun mmk2410/tab-bar-switch-to-agenda ()
|
||||
"Switch to agenda/journal tab and there in the agenda window."
|
||||
(interactive)
|
||||
(tab-bar-switch-to-tab "Agenda / Journal")
|
||||
(unless (string= (buffer-name) "*Org Agenda*")
|
||||
(other-window 1)))
|
||||
|
||||
(defun mmk2410/tab-bar-switch-to-journal ()
|
||||
"Switch to agenda/journal tab and there in the journal window."
|
||||
(interactive)
|
||||
(tab-bar-switch-to-tab "Agenda / Journal")
|
||||
(if (string= (buffer-name) "*Org Agenda*")
|
||||
(other-window 1)))
|
||||
|
||||
(defun mmk2410/tab-bar-switch-to-irc ()
|
||||
"Switch to IRC tab."
|
||||
(interactive)
|
||||
(tab-bar-switch-to-tab "IRC"))
|
||||
|
||||
(defun mmk2410/tab-bar-switch-to-rss ()
|
||||
"Switch to RSS tab."
|
||||
(interactive)
|
||||
(tab-bar-switch-to-tab "RSS"))
|
||||
|
||||
(global-set-key (kbd "C-c f C-f") 'mmk2410/tab-bar-setup)
|
||||
(global-set-key (kbd "C-c f m") 'mmk2410/tab-bar-switch-to-mail)
|
||||
(global-set-key (kbd "C-c f a") 'mmk2410/tab-bar-switch-to-agenda)
|
||||
(global-set-key (kbd "C-c f j") 'mmk2410/tab-bar-switch-to-journal)
|
||||
(global-set-key (kbd "C-c f i") 'mmk2410/tab-bar-switch-to-irc)
|
||||
(global-set-key (kbd "C-c f r") 'mmk2410/tab-bar-switch-to-rss)
|
||||
(use-package mmk2410-tab-bar-helpers
|
||||
:after (hydra)
|
||||
:load-path "packages/"
|
||||
:bind ("C-c f" . mmk2410/tab-bar/body))
|
||||
#+end_src
|
||||
|
|
|
@ -67,8 +67,6 @@
|
|||
("m" mmk2410/tab-bar-run-mail "Mail")
|
||||
("p" mmk2410/tab-bar-run-projects "Projects"))
|
||||
|
||||
(global-set-key (kbd "C-c f") 'mmk2410/tab-bar/body)
|
||||
|
||||
(provide mmk2410/tab-bar-helpers)
|
||||
(provide 'mmk2410-tab-bar-helpers)
|
||||
|
||||
;;; tab-bar-helpers.el ends here
|
Loading…
Add table
Add a link
Reference in a new issue