summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--init.el24
1 files changed, 24 insertions, 0 deletions
diff --git a/init.el b/init.el
index fa075be..921a472 100644
--- a/init.el
+++ b/init.el
@@ -1550,6 +1550,30 @@
("S" . jao-doc-session-save)
("u" . jao-doc-view-visit-url)))
+;;;; pdf-tools
+(use-package pdf-tools
+ :ensure t
+ :demand t
+ :init
+ (add-hook 'after-init-hook
+ (lambda ()
+ (setq pdf-view-midnight-colors
+ (cons (frame-parameter nil 'foreground-color)
+ (frame-parameter nil 'background-color)))))
+
+ :hook ((pdf-view-mode . jao-doc-session-mark))
+
+ :config (pdf-tools-install)
+
+ :diminish ((pdf-view-midnight-minor-mode . ""))
+
+ :bind (:map pdf-view-mode-map
+ (("C-c C-d" . pdf-view-midnight-minor-mode)
+ ("j" . pdf-view-next-line-or-next-page)
+ ("J" . pdf-view-scroll-up-or-next-page)
+ ("k" . pdf-view-previous-line-or-previous-page)
+ ("K" . pdf-view-scroll-down-or-previous-page))))
+
;;;; epub
(use-package nov
:ensure t