+(use-package winner
+ :ensure t
+ :config
+ (winner-mode 1))
+
+;; Use a different spell checker, always
+(use-package jinx
+ :ensure t
+ :config
+ (keymap-global-set "M-$" #'jinx-correct)
+ :hook (emacs-startup . global-jinx-mode))
+
+
+;; Bind embark
+(use-package embark
+ :ensure t
+ :config
+ (keymap-global-set "C-." #'embark-act)
+ (keymap-global-set "C-;" #'embark-dwim))
+
+(use-package consult
+ :ensure t
+ :config
+ ;; Change default bindings to consult- ones
+ :bind
+ (;; C-x bindings in `ctl-x-map'
+ ("C-x b" . consult-buffer) ;; orig. switch-to-buffer
+ ("C-x 4 b" . consult-buffer-other-window) ;; orig. switch-to-buffer-other-window
+ ("C-x r b" . consult-bookmark) ;; orig. bookmark-jump
+ ;; Other custom bindings
+ ("M-y" . consult-yank-pop))) ;; orig. yank-pop
+
+;; Configure `world-clock'
+(use-package time
+ :ensure nil
+ :config
+ (setq zoneinfo-style-world-list '(("Europe/Brussels" "Leuven")))
+ (add-to-list 'zoneinfo-style-world-list '("Australia/Perth" "Perth")))
+
+
+;; View PDFs in Emacs
+(pdf-loader-install) ; On demand loading, leads to faster startup time
+
+(use-package magit
+ :ensure t)
+
+(use-package eat
+ :ensure t
+ :config
+ ;; For `eat-eshell-mode'.
+ (add-hook 'eshell-load-hook #'eat-eshell-mode)
+ (setq eshell-visual-commands '()))
+
+;; Read ePub files
+(use-package nov
+ :ensure t
+ :init
+ (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
+ :config
+ (add-hook 'nov-mode-hook #'variable-pitch-mode))
+
+;; Set some preset fonts
+(use-package fontaine
+ :ensure t
+ :config
+ (setq fontaine-presets
+ '((regular-1
+ :default-family "Iosevka Nerd Font"
+ :default-height 120
+ :variable-pitch-family "Linux Biolinum O"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.1
+ :italic-family "Iosevka Etoile"
+ :line-spacing 1)
+ (large-1
+ :default-family "Iosevka Nerd Font"
+ :default-height 150
+ :variable-pitch-family "Linux Biolinum O"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.1
+ :italic-family "Iosevka Etoile"
+ :line-spacing 1)
+ (regular-2
+ :default-family "Fira Mono Nerd Font"
+ :default-height 140
+ :variable-pitch-family "Fira Sans Book"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.0
+ :line-spacing 1)
+ (large-2
+ :default-family "Fira Mono Nerd Font"
+ :default-height 140
+ :variable-pitch-family "Fira Sans Book"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.0
+ :line-spacing 1)
+ (ereader-Baskerville
+ :variable-pitch-family "Libre Baskerville"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.0
+ :line-spacing 1)
+ (ereader-Noto-Serif
+ :variable-pitch-family "Noto Serif"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.0
+ :line-spacing 1)
+ (ereader-Bembo-Tufte
+ :variable-pitch-family "ETBembo"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.1
+ :line-spacing 1)
+ (ereader-Literata
+ :variable-pitch-family "Literata"
+ :variable-pitch-weight normal
+ :variable-pitch-height 1.0
+ :line-spacing 1))))
+
+;; Custom functions
+
+;; Might want to run this automatically
+;; using variable after-focus-change-function
+(defun my/adjust-font-size-based-on-display ()
+ "Change size of fonts based on monitor."
+ (interactive)
+ (let* ((display-name (cdr (assq 'name (frame-monitor-attributes))))
+ (font-height (cond ((string-equal display-name "eDP-1") 140)
+ (t 120) ;; default
+ )))
+ (set-face-attribute 'default (selected-frame) :height font-height)))