Skip to content

Instantly share code, notes, and snippets.

@hdevalence
Created July 7, 2015 00:08
Show Gist options
  • Save hdevalence/43239d2ad9a88a15374d to your computer and use it in GitHub Desktop.
Save hdevalence/43239d2ad9a88a15374d to your computer and use it in GitHub Desktop.
docview solarized
;;; 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