 (setq window-resize-pixelwise t)
 (setq frame-resize-pixelwise t)
 
-;;; ---------- Source control ----------
-
-(unless (package-installed-p 'magit)
-  (package-install 'magit))
-
-(global-set-key (kbd "C-c g") #'magit-status)
-
 ;;; ---------- Markdown support ----------
 
 (unless (package-installed-p 'markdown-mode)

(setq org-babel-python-command "python3")
(setq org-babel-scheme-command "mit-scheme")

;;; The Simple HTML Renderer (shr) is used by the Emacs Web Browser (EWW) and
;;; nov.el to render HTML. I want it to act mostly like reader mode.

(setq shr-use-colors nil)
(setq shr-use-fonts nil)
(setq shr-max-image-proportion 0.6)
(setq shr-width 72)

;;; nov.el for reading epubs

(require 'visual-fill-column)
(defun nov-mode-spacing ()
  "Spacing for nov.el mode."
  (progn
    (setq line-spacing 0.3)
    (setq nov-text-width 72)
    (setq visual-fill-column-center-text t)
    (visual-line-mode)
    (visual-fill-column-mode)))
(add-hook 'nov-mode-hook 'nov-mode-spacing)

(defun my-nov-window-configuration-change-hook ()
  (my-nov-post-html-render-hook)
  (remove-hook 'window-configuration-change-hook
	       'my-nov-window-configuration-change-hook
	       t))

(defun my-nov-post-html-render-hook ()
  (if (get-buffer-window)
      (with-current-buffer (current-buffer)
	(goto-char (point-min))
	(while (not (eobp))
	  (when (looking-at "^[[:space:]]*$")
	    (kill-line)
	    (insert "    "))
	  (forward-line 1)))
    (add-hook 'window-configuration-change-hook
	      'my-nov-window-configuration-change-hook
	      nil t)))

;; (add-hook 'nov-post-html-render-hook 'my-nov-post-html-render-hook)

;; (add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))

;;; init.el ends here


;;; ---------- Completion ----------

;; (icomplete-mode)

(require 'vertico)
(vertico-mode)

;;; ---------- Modus theme ----------

(load-theme 'modus-operandi)
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)

