diff options
-rw-r--r-- | attic/elisp/misc.el | 24 | ||||
-rw-r--r-- | init.el | 73 |
2 files changed, 49 insertions, 48 deletions
diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index 870bb37..2565637 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -319,6 +319,30 @@ (interactive) (jao-notify "Volume" (format "%s%%" (jao-player-volume)))) +;;; 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)))) + ;;; outline mode for notmuch tree view (defun jao-notmuch-tree--msg-prefix (msg) @@ -1477,54 +1477,6 @@ (shell-command (format "r2e run %s" name))))))) ;;; PDFs and other docs -;;;; doc-view -(use-package doc-view - :init - (setq doc-view-cache-directory "~/.emacs.d/cache/docview" - doc-view-resolution 110 - doc-view-continuous t - doc-view-conversion-refresh-interval 1) - :hook ((doc-view-mode . jao-doc-session-mark)) - :bind (:map doc-view-mode-map - ("j" . doc-view-next-line-or-next-page) - ("J" . doc-view-scroll-up-or-next-page) - ("k" . doc-view-previous-line-or-previous-page) - ("K" . doc-view-scroll-down-or-previous-page))) - -(use-package jao-doc-session :demand t) - -(use-package jao-doc-view - :demand t - :bind (:map doc-view-mode-map - ("b" . jao-doc-view-back) - ("B" . jao-doc-view-forward) - ("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)))) - ;;;; open pdfs (use-package jao-pdf :demand t) @@ -1600,6 +1552,31 @@ (add-to-list 'browse-url-handlers (cons "^doc://.+" 'jao-open-doc-url)) +;;;; doc-view +(use-package doc-view + :init + (setq doc-view-cache-directory "~/.emacs.d/cache/docview" + doc-view-resolution 110 + doc-view-continuous t + doc-view-conversion-refresh-interval 1) + :hook ((doc-view-mode . jao-doc-session-mark)) + :bind (:map doc-view-mode-map + ("j" . doc-view-next-line-or-next-page) + ("J" . doc-view-scroll-up-or-next-page) + ("k" . doc-view-previous-line-or-previous-page) + ("K" . doc-view-scroll-down-or-previous-page) + ("z" . jao-open-with-zathura))) + +(use-package jao-doc-session :demand t) + +(use-package jao-doc-view + :demand t + :bind (:map doc-view-mode-map + ("b" . jao-doc-view-back) + ("B" . jao-doc-view-forward) + ("S" . jao-doc-session-save) + ("u" . jao-doc-view-visit-url))) + ;;;; epub (use-package nov :ensure t |