Created
July 7, 2015 00:08
-
-
Save hdevalence/43239d2ad9a88a15374d to your computer and use it in GitHub Desktop.
docview solarized
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; adapted from https://groups.google.com/forum/#!topic/comp.emacs/SU6h21mb0ds | |
;;; TODO get the fg/bg colors from the current theme? | |
(defun doc-view-solarized () | |
"to view solarized pdfs" | |
(interactive) | |
(let ((pattern (format "%s/*.png" doc-view--current-cache-dir)) ) | |
(dolist (png-fname(file-expand-wildcards pattern)) | |
(start-process-shell-command | |
"-doc-view-inverting-" "-doc-view-inverting-" | |
"convert" png-fname "-fill '#002b36' -opaque white -fill '#eee8d5' -opaque black" png-fname)) | |
(clear-image-cache ) )) | |
(defun doc-view-clear-image-cache () | |
"to get doc-view-invert(ed) current page update" | |
(interactive) | |
(clear-image-cache)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment