]> git.vanrenterghem.biz Git - Dotty.git/blob - emacs/.emacs.d/init.el
e5c157dfcfa5c3ed104d0cf11b2d524e27e973d1
[Dotty.git] / emacs / .emacs.d / init.el
1 ;; Added by Package.el.  This must come before configurations of
2 ;; installed packages.  Don't delete this line.  If you don't want it,
3 ;; just comment it out by adding a semicolon to the start of the line.
4 ;; You may delete these explanatory comments.
5 (package-initialize)
7 (add-to-list 'load-path "~/.emacs.d/lisp/")
9 (tool-bar-mode -1)
11 ;; Configure printing using CUPS network printer
12 (setq lpr-switches
13       (append '("-o raw"
14                 "-o media=A4")
15               lpr-switches))
17 ;; Enable the melpa archive for packages
18 (use-package package
19   :config
20   (setq package-enable-at-startup nil)
21   (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
22   (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
23   (add-to-list 'package-archives
24                '("elpy" . "http://jorgenschaefer.github.io/packages/")))
26 (use-package system-packages
27   :ensure t)
29 (use-package modus-themes
30   :ensure t
31   :demand t ;; Without this, the theme load is deferred due to the
32             ;; bind keyword below
33   :init
34   ;; Add all customisation prior to loading the themes
35   (setq modus-themes-mixed-fonts t)
36   :config
37   (modus-themes-select 'modus-vivendi-tinted)
38   (variable-pitch-mode)
39   :bind ("<f5>" . modus-themes-toggle))
41 (use-package orderless
42   :ensure t
43   :config
44   (setq completion-styles '(orderless basic)
45         completion-category-overrides '((file (styles basic partial-completion)))))
47 ;; follow links to version-controlled files without confirming
48 vc-follow-symlinks t
50 ;; ESS - for working in R
51 (autoload 'R-mode "ess-site.el" "Major mode for editing R source." t)
52 (setq load-path (cons "/usr/share/emacs/site-lisp/ess" load-path))
53 (load "/usr/share/emacs/site-lisp/ess/lisp/ess-site")
54 (setq inferior-julia-program-name "/usr/bin/julia")
56 (use-package ess-view-data
57   :ensure t)
59 ;; enable autocomplete
60 (use-package corfu
61   :ensure t
62   ;; Optional customizations
63   :custom
64   (corfu-cycle t)                ;; Enable cycling for `corfu-next/previous'
65   (corfu-auto t)                 ;; Enable auto completion
66   ;; (corfu-separator ?\s)          ;; Orderless field separator
67   ;; (corfu-quit-at-boundary nil)   ;; Never quit at completion boundary
68   ;; (corfu-quit-no-match nil)      ;; Never quit, even if there is no match
69   ;; (corfu-preview-current nil)    ;; Disable current candidate preview
70   ;; (corfu-preselect 'prompt)      ;; Preselect the prompt
71   ;; (corfu-on-exact-match nil)     ;; Configure handling of exact matches
72   ;; (corfu-scroll-margin 5)        ;; Use scroll margin
74   ;; Enable Corfu only for certain modes. See also `global-corfu-modes'.
75   ;; :hook ((prog-mode . corfu-mode)
76   ;;        (shell-mode . corfu-mode)
77   ;;        (eshell-mode . corfu-mode))
79   ;; Recommended: Enable Corfu globally.  This is recommended since Dabbrev can
80   ;; be used globally (M-/).  See also the customization variable
81   ;; `global-corfu-modes' to exclude certain modes.
82   :init
83   (global-corfu-mode)
84   (corfu-history-mode))
86 (use-package cape
87   :ensure t
88   ;; Bind prefix keymap providing all Cape commands under a mnemonic key.
89   ;; Press C-c p ? to for help.
90   :bind ("C-c p" . cape-prefix-map) ;; Alternative keys: M-p, M-+, ...
91   ;; Alternatively bind Cape commands individually.
92   ;; :bind (("C-c p d" . cape-dabbrev)
93   ;;        ("C-c p h" . cape-history)
94   ;;        ("C-c p f" . cape-file)
95   ;;        ...)
96   :init
97   ;; Add to the global default value of `completion-at-point-functions' which is
98   ;; used by `completion-at-point'.  The order of the functions matters, the
99   ;; first function returning a result wins.  Note that the list of buffer-local
100   ;; completion functions takes precedence over the global list.
101   (add-hook 'completion-at-point-functions #'cape-dict) ;; requires words package to be installed on Arch to provide /usr/share/dict/words
102   (add-hook 'completion-at-point-functions #'cape-dabbrev)
103   (add-hook 'completion-at-point-functions #'cape-file) 
104   (add-hook 'completion-at-point-functions #'cape-elisp-block)
105   ;; (add-hook 'completion-at-point-functions #'cape-history)
106   ;; ...
107   )
109 (use-package org
110   :ensure t
111   :bind
112   (("C-c c" . org-capture)
113    ("C-c l" . org-store-link)
114    ("C-c a" . org-agenda))
115   :custom
116   (org-default-notes-file "~/Nextcloud/notes/inbox.org")
117   (org-agenda-files `(,org-default-notes-file "~/Nextcloud/notes/calendar.org"))
118   (org-capture-bookmark nil)
119   ;; Capture templates
120   (org-capture-templates
121    '(("f" "Fleeting note" entry
122       (file+headline org-default-notes-file "Notes")
123       "* %?\nEntered on %U\n  %i\n  %a")
124      ("b" "Tax receipt" item
125       (file "~/Documents/belastingen/FY24-25.org")
126       "* %t %a\n")
127      ("a" "Appointment" entry
128            (file+olp+datetree "~/Nextcloud/notes/calendar.org")
129            "* %?\n :PROPERTIES:\n :location: %^{Location}\n :END:\n%^T--%^T\n\n"
130            :jump-to-captured t
131            :empty-lines 1
132            :tree-type month
133            :time-prompt t)
134      ("p" "Permanent note" plain
135       (file denote-last-path)
136       #'denote-org-capture
137       :no-save t
138       :immediate-finish nil
139       :kill-buffer t
140       :jump-to-captured t)
141      ("t" "New task" entry
142       (file+headline org-default-notes-file "Tasks")
143       "* TODO %i%?")
144      ("e" "Email follow-up" entry (file+headline org-default-notes-file "Tasks")
145       "* TODO %:fromname: %a %?\nDEADLINE: %(org-insert-time-stamp (org-read-date nil t \"+2d\"))")))
146   ;; Agenda views
147   (org-agenda-custom-commands
148    '(("P" "Expired calendar events" ((tags "TIMESTAMP<=\"<now>\"")))
149      ("n" "Agenda and all TODOs"  ((agenda "") (alltodo "")))))
150   :config
151   ;; Configure refile
152   (defun my/opened-buffer-files ()
153     "Return the list of org files currently opened in emacs"
154     (delq nil
155           (mapcar (lambda (x)
156                     (if (and (buffer-file-name x)
157                              (string-match "\\.org$"
158                                            (buffer-file-name x)))
159                         (buffer-file-name x)))
160                   (buffer-list))))
161   (setq org-refile-targets `((my/opened-buffer-files :maxlevel . 9)
162                              (,(file-expand-wildcards  "~/Nextcloud/notes/*.org") :maxlevel . 1)))
163   (setq org-agenda-skip-scheduled-if-done t)
164   (setq org-agenda-skip-deadline-if-done t)
165   (setq org-agenda-start-on-weekday nil)
166   (setq org-log-done 'time)
167   ;; Automatically flow lines based on window width and use
168   ;; variable width fonts in org-mode.
169   (add-hook 'org-mode-hook 'visual-line-mode)
170   (add-hook 'org-mode-hook 'variable-pitch-mode)
171   ;; org-mode support for R and LaTeX
172   (org-babel-do-load-languages
173    'org-babel-load-languages
174    '((R . t)
175      (latex . t))))
177 (use-package org-caldav
178   :ensure t
179   :config
180   (setq org-caldav-url "https://owncloud.vanrenterghem.biz/remote.php/dav/calendars/frederik")
181   (setq org-caldav-calendar-id "orgmode")
182   ;; Org filename where new entries from calendar stored
183   (setq org-caldav-inbox "~/Nextcloud/notes/calendar.org")
184   ;; Additional Org files to check for calendar events
185   (setq org-caldav-files nil)
186   ;; Usually a good idea to set the timezone manually
187   (setq org-icalendar-timezone "Australia/Perth"))
189 (use-package org-protocol)
191 (use-package tex
192   :ensure auctex
193   :config
194   (setq TeX-auto-save t
195         TeX-parse-self t
196         TeX-view-program-selection
197    '(((output-dvi has-no-display-manager)
198       "dvi2tty")
199      ((output-dvi style-pstricks)
200       "dvips and gv")
201      (output-dvi "xdvi")
202      (output-pdf "PDF Tools")
203      (output-html "xdg-open"))))
204 ;; (load "preview-latex.el" nil t t)
207 ;; Automatically switch to various modes
208 (setq auto-mode-alist
209     '(("\\.mdwn\\'" . markdown-mode)
210       ("\\.md\\'" . markdown-mode)
211       ("\\.yarn\\'" . markdown-mode)
212       ("\\.cpp\\'" . c++-mode)
213       ("\\.js\\'" . js-mode)
214       ("\\.json\\'" . js-mode)
215       ("Makefile" . makefile-mode)
216       ("README" . markdown-mode)
217       ("NEWS" . markdown-mode)
218       ("COMMIT_EDITMSG\\'" . text-mode)
219       ("\\.html\\'" . html-mode)
220       ("\\.css\\'" . css-mode)
221       ("\\.yaml\\'" . yaml-mode)
222       ("\\.yml\\'" . yaml-mode)
223       ("\\.ick\\'" . yaml-mode)
224       ("\\.py\\'" . python-mode)
225       ("\\.R\\'" . R-mode)
226       ("\\.org\\'" . org-mode)
227       ("\\.tex\\'" . latex-mode)
228       ("\\.sh\\'" . shell-script-mode)
229       ("\\.hs\\'" . haskell-mode)
230       ("\\.el\\'" . emacs-lisp-mode)))
233 (custom-set-variables
234  ;; custom-set-variables was added by Custom.
235  ;; If you edit it by hand, you could mess it up, so be careful.
236  ;; Your init file should contain only one such instance.
237  ;; If there is more than one, they won't work right.
238  '(browse-url-browser-function 'browse-url-firefox)
239  '(custom-safe-themes
240    '("8d146df8bd640320d5ca94d2913392bc6f763d5bc2bb47bed8e14975017eea91"
241      "9a977ddae55e0e91c09952e96d614ae0be69727ea78ca145beea1aae01ac78d2"
242      "0cf95236abcf59e05b1ea69b4edd53d293a5baec4fe4c3484543fee99bfd2204"
243      "80b00f3bf7cdbdca6c80aadfbbb03145f3d0aacf6bf2a559301e61109954e30a"
244      default))
245  '(org-export-backends '(ascii html icalendar latex md odt))
246  '(package-selected-packages
247    '(## ack all-the-icons-dired auctex calfw calfw-org company consult
248             consult-denote denote devdocs dired-preview
249             dired-quick-sort eat elfeed-protocol ellama elpy embark
250             embark-consult emms engrave-faces ess ess-R-data-view
251             ess-smart-underscore ess-view-data flx fontaine ftable
252             haskell-mode htmlize jinx julia-mode leuven-theme libmpdel
253             lsp-mode lua-mode magit marginalia mpdel-embark mu4e
254             mustache nerd-icons nerd-icons-dired nov orderless org
255             org-caldav org-contrib org-ql org-static-blog osm ox-rss
256             pass password-store powerthesaurus request straight
257             vertico))
258  '(use-package-compute-statistics t))
259 (custom-set-faces
260  ;; custom-set-faces was added by Custom.
261  ;; If you edit it by hand, you could mess it up, so be careful.
262  ;; Your init file should contain only one such instance.
263  ;; If there is more than one, they won't work right.
264  )
267 ;; Send mail using SMTP via mail.vanrenterghem.io.
268 (setq send-mail-function    'smtpmail-send-it)
269 (setq smtpmail-smtp-server "mail.vanrenterghem.io"
270       smtpmail-smtp-service 587
271       smtpmail-stream-type 'starttls)
272 (setq user-full-name "Frederik Vanrenterghem"
273       smtpmail-local-domain "vanrenterghem.io"
274       user-mail-address (concat "frederik@" smtpmail-local-domain))
275 ;; Ignored in mu4e as it sets user-agent
276 (setq mail-default-headers
277       (concat "X-Mailer: GNU Emacs " (symbol-value 'emacs-version))) 
278 (setq w3m-pop-up-frames t)
280 (global-set-key [remap list-buffers] 'ibuffer)
282 ;;; use pass (~/.password-store)
283 ;;; (see The Unix password store)
284 (use-package pass
285   :ensure t
286   :config
287   (auth-source-pass-enable)
288   (setq pass-username-field "Username"))
290 ;; Elfeed news reader from Nextcloud
291 (use-package elfeed
292   :ensure t
293   :config
294   (setq elfeed-use-curl nil)
295   (elfeed-set-timeout 36000)
296   (define-key elfeed-search-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-search-toggle-all '(star))))
297   (define-key elfeed-show-mode-map (kbd "*") (lambda () (interactive) (apply 'elfeed-show-tag '(star))))
298   (add-hook 'elfeed-show-mode 'variable-pitch-mode))
300 (use-package elfeed-protocol
301   :ensure t
302   :after elfeed
303   :config
304   (setq elfeed-protocol-feeds '(
305                                 ("owncloud+https://frederik@owncloud.vanrenterghem.biz" :use-authinfo t)
306         ))
307   (elfeed-protocol-enable))
310 ;; Read and write email using mu4e
311 (use-package mu4e
312   :ensure nil
313   ;; :ensure-system-package mu ;; Install from aur
314   :config
315   (setq mail-user-agent 'mu4e-user-agent)
316   ;; Also use mu4e when called from gnus-dired-attach
317   (setq gnus-dired-mail-mode 'mu4e-user-agent
318         mu4e-get-mail-command "mbsync io"
319         mu4e-update-interval 600
320         mu4e-use-fancy-chars t
321         mu4e-view-show-images t
322         mu4e-sent-folder   "/Sent"
323         mu4e-drafts-folder "/Drafts"
324         mu4e-trash-folder  "/Trash"
325         message-kill-buffer-on-exit t
326         ;;Fixing duplicate UID errors when using mbsync and mu4e
327         mu4e-change-filenames-when-moving t)
328   ;; attach files to mu4e messages by marking the file(s) in dired and pressing C-c RET C-a
329   (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
330   ;; Define all bookmarks starting with favourite query used in mailcount modeline
331   (setq mu4e-bookmarks
332         '(( :name "Last 24h's messages"
333           :key ?l
334           :favorite y
335           :query "date:24h..now AND NOT flag:trashed")
336         ( :name "Unread messages"
337           :query "flag:unread AND NOT flag:trashed"
338           :key ?u)
339         ( :name "Today's messages"
340           :query "date:today..now AND NOT flag:trashed"
341           :key ?t)
342         ( :name "Last 7 days"
343           :query "date:7d..now AND NOT flag:trashed"
344           :hide-unread t
345           :key ?w)
346         ( :name "Messages with images"
347           :query "mime:image/* AND NOT flag:trashed"
348           :key ?p)))
349   ;; Create custom spam status header and show in message view
350   (add-to-list 'mu4e-header-info-custom
351                '(:spam-status .
352                               ( :name "Spam-Status"     ;; long name, as seen in the message-view
353                                 :shortname "Spam"      ;; short name, as seen in the headers view
354                                 :help "The Spam status" ;; tooltip
355                                 ;; uses mu4e-fetch-field which is rel. slow, so only appropriate
356                                 ;; for mu4e-view-fields, and _not_ mu4e-headers-fields
357                                 :function (lambda (msg)
358                                             (or (string-join (seq-take (split-string (or (mu4e-fetch-field msg "X-Spam-Status") "") " ") 2) " ") "")))))
359   (add-to-list 'mu4e-view-fields :spam-status)
360   ;; Resize image attachments when sending email
361   (defvar mu4e-resize-image-types '("jpg" "png" "svg" "jpeg")
362     "List of attached image types to resize.")
363   (defvar mu4e-inhibit-resize nil)
364   (defun mu4e-resize-image-attachments ()
365     (unless mu4e-inhibit-resize
366       (let (cmds
367             (image-types
368              (mapconcat #'identity mu4e-resize-image-types "\\|")))
369         (save-excursion
370           (message-goto-body-1)
371           (while (re-search-forward 
372                   (format "<#part.+\\(filename=\"\\)\\(.+\\(\\.%s\\)\\)\""
373                           image-types)
374                   nil t)
375             (let* ((infile (match-string-no-properties 2))
376                    (outfile (concat (temporary-file-directory)
377                                     (file-name-nondirectory infile))))
378               (push (format "magick convert %s -resize 1200x1200\\> %s"
379                             (shell-quote-argument infile)
380                             (shell-quote-argument outfile))
381                     cmds)
382               (replace-match outfile t t nil 2)))
383           (mapcar #'shell-command cmds)))))
384   (add-hook 'message-send-hook 'mu4e-resize-image-attachments)
385   (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode) ;; Attach files to messages using dired C-c RET C-a
386   (defun mu4e-inhibit-resize()
387     (interactive)
388     (set (make-local-variable 'mu4e-inhibit-resize) t)))
390 ;; Load configuration for website
391 ;(load "mustache-html")
393 ;; Denote config
394 (use-package denote
395   :ensure t
396   :hook (dired-mode . denote-dired-mode)
397   :bind
398   (("C-c n n" . denote)
399    ("C-c n r" . denote-rename-file)
400    ("C-c n l" . denote-link)
401    ("C-c n b" . denote-backlinks))
402   :config
403   (setq denote-directory "/home/frederik/Nextcloud/notes/")
404   (denote-rename-buffer-mode 1))
406 (use-package nerd-icons
407   ;; :custom
408   ;; The Nerd Font you want to use in GUI
409   ;; "Symbols Nerd Font Mono" is the default and is recommended
410   ;; but you can use any other Nerd Font if you want
411   ;; (nerd-icons-font-family "Symbols Nerd Font Mono")
412   )
414 ;; Dired configuration
415 (with-eval-after-load 'dired
416   (require 'dired-x)
417   ;; Set dired-x global variables here.  For example:
418   ;; (setq dired-x-hands-off-my-keys nil)
419   )
420 (add-hook 'dired-mode-hook
421           (lambda ()
422             ;; Set dired-x buffer-local variables here.
423             (dired-omit-mode 1)
424             (dired-hide-details-mode 1)
425             (nerd-icons-dired-mode 1)
426             ))
427 (setq delete-by-moving-to-trash t)
428 (setq dired-guess-shell-alist-user
429       '(("\\.\\(png\\|jpe?g\\|tiff\\)" "feh" "xdg-open")
430         ("\\.\\(mp[34]\\|m4a\\|ogg\\|flac\\|webm\\|mkv\\)" "mpv" "xdg-open")
431                 (".*" "xdg-open")))
433 ;; Use `vertico' package to get a vertical view of the minibuffer.
434 (use-package vertico
435   :ensure t
436   :config
437   (setq vertico-resize nil)
438   (vertico-mode 1))
440 ;; Persist history over Emacs restarts. Vertico sorts by history position.
441 (use-package savehist
442   :init
443   (savehist-mode))
445 ;; Use `marginalia' package.  This will display useful
446 ;; annotations next to entries in the minibuffer.  For example, when
447 ;; using M-x it will show a brief description of the command as well
448 ;; as the keybinding associated with it (if any).
449 (use-package marginalia
450   :ensure t
451   :config
452   (marginalia-mode 1))
454 ;; Use 'winner' mode to undo and redo windows changes
455 ;; using C-c <left> and C-c <right>.
456 (use-package winner
457   :ensure t
458   :config
459   (winner-mode 1))
461 ;; Use a different spell checker, always
462 (use-package jinx
463   :ensure t
464   :config
465   (keymap-global-set "M-$" #'jinx-correct)
466   :hook (emacs-startup . global-jinx-mode))
468 (use-package powerthesaurus
469   :ensure t
470   :init
471   (require 'transient)
472   (transient-define-prefix my/transient-spelling ()
473     "Spelling commands"
474     ["Spelling"
475       ["Lookups"
476         ("y" "Synonyms" powerthesaurus-lookup-synonyms-dwim)
477         ("a" "Antonyms" powerthesaurus-lookup-antonyms-dwim)]
478       ["Spelling Tools"
479         ("x" "Jinx" jinx-mode)
480         ("c" "Jinx correct" jinx-correct)]
481       ["Dictionary"
482         ("d" "Lookup" dictionary-lookup-definition)]
483       ["Miscellaneous"
484         ("q" "Quit" transient-quit-one)]])
485   :bind
486   ("C-c s" . my/transient-spelling))
488 ;; Bind embark
489 (use-package embark
490   :ensure t
491   :config
492   (keymap-global-set "C-." #'embark-act)
493   (keymap-global-set "C-;" #'embark-dwim))
495 (use-package consult
496   :ensure t
497   :config
498   ;; Change default bindings to consult- ones
499   :bind
500   (;; C-x bindings in `ctl-x-map'
501    ("C-x b" . consult-buffer)                ;; orig. switch-to-buffer
502    ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
503    ("C-x r b" . consult-bookmark)            ;; orig. bookmark-jump
504    ;; Other custom bindings
505    ("M-y" . consult-yank-pop)))              ;; orig. yank-pop
507 (use-package consult-mu
508   :ensure nil ;; cloned in
509   :load-path "~/.emacs.d/lisp/consult-mu"
510   :after (consult mu4e)
511   :custom
512   ;;maximum number of results shown in minibuffer
513   (consult-mu-maxnum 200)
514   ;;show preview when pressing any keys
515   (consult-mu-preview-key 'any)
516   ;;do not mark email as read when previewed
517   (consult-mu-mark-previewed-as-read nil)
518   ;;do not amrk email as read when selected. This is a good starting point to ensure you would not miss important emails marked as read by mistake especially when trying this package out. Later you can change this to t.
519   (consult-mu-mark-viewed-as-read nil)
520   ;; open the message in mu4e-view-buffer when selected.
521   (consult-mu-action #'consult-mu--view-action)
522   )
524 (use-package consult-denote
525   :ensure t)
527 ;; Configure `world-clock'
528 (use-package time
529   :ensure nil
530   :config
531   (setq zoneinfo-style-world-list '(("Europe/Brussels" "Leuven")))
532   (add-to-list 'zoneinfo-style-world-list '("Australia/Perth" "Perth")))
535 ;; View PDFs in Emacs
536 (pdf-loader-install) ; On demand loading, leads to faster startup time
537 (setq pdf-misc-print-programm "/usr/bin/lpr")
538   
539 (use-package magit
540   :ensure t)
542 (use-package eat
543   :ensure t
544   :config
545    ;; For `eat-eshell-mode'.
546   (add-hook 'eshell-load-hook #'eat-eshell-mode)
547   (setq eshell-visual-commands '()))
549 ;; Read ePub files
550 (use-package nov
551   :ensure t
552   :init
553   (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
554   :config
555   (add-hook 'nov-mode-hook #'variable-pitch-mode))
557 ;; Set some preset fonts
558 (use-package fontaine
559   :ensure t
560   :config
561   (setq fontaine-presets
562       '((regular-1
563          :default-family "Iosevka Nerd Font"
564          :default-height 120
565          :variable-pitch-family "Linux Biolinum O"
566          :variable-pitch-weight normal
567          :variable-pitch-height 1.1
568          :italic-family "Iosevka Etoile"
569          :line-spacing 1)
570         (large-1
571          :default-family "Iosevka Nerd Font"
572          :default-height 150
573          :variable-pitch-family "Literata"
574          :variable-pitch-weight normal
575          :variable-pitch-height 1.0
576          :line-spacing 1)
577         (regular-2
578          :default-family "Fira Mono Nerd Font"
579          :default-height 140
580          :variable-pitch-family "Fira Sans Book"
581          :variable-pitch-weight normal
582          :variable-pitch-height 1.0
583          :line-spacing 1)
584         (large-2
585          :default-family "Fira Mono Nerd Font"
586          :default-height 140
587          :variable-pitch-family "Fira Sans Book"
588          :variable-pitch-weight normal
589          :variable-pitch-height 1.0
590          :line-spacing 1)
591         (ereader-Baskerville
592          :variable-pitch-family "Libre Baskerville"
593          :variable-pitch-weight normal
594          :variable-pitch-height 1.0
595          :line-spacing 1)
596         (ereader-Noto-Serif
597          :variable-pitch-family "Noto Serif"
598          :variable-pitch-weight normal
599          :variable-pitch-height 1.0
600          :line-spacing 1)
601         (ereader-Bembo-Tufte
602          :variable-pitch-family "ETBembo"
603          :variable-pitch-weight normal
604          :variable-pitch-height 1.1
605          :line-spacing 1)
606         (ereader-Literata
607          :variable-pitch-family "Literata"
608          :variable-pitch-weight normal
609          :variable-pitch-height 1.0
610          :line-spacing 1))))
612 (use-package devdocs
613   :ensure t
614   :bind
615   ("C-h D" . devdocs-lookup))
617 (use-package emms
618   :ensure t
619   :config
620   (require 'emms-setup)
621   (require 'emms-player-mpd)
622   (emms-all) ; don't change this to values you see on stackoverflow questions if you expect emms to work
623   (setq emms-player-list '(emms-player-mpd))
624   (add-to-list 'emms-info-functions 'emms-info-mpd)
625   (add-to-list 'emms-player-list 'emms-player-mpd)
626   
627   ;; Socket is not supported
628   (setq emms-player-mpd-server-name "mea-hookani-pila")
629   (setq emms-player-mpd-server-port "6600")
630   (emms-player-mpd-connect))
632 ;; Custom functions
634 ;; Might want to run this automatically
635 ;; using variable after-focus-change-function
636 (defun my/adjust-font-size-based-on-display ()
637   "Change size of fonts based on monitor."
638   (interactive)
639   (let* ((display-name (cdr (assq 'name (frame-monitor-attributes))))
640          (font-height (cond ((string-equal display-name "eDP-1") 140) 
641                             (t 120) ;; default
642                             )))
643     (set-face-attribute 'default (selected-frame) :height font-height)))