~protesilaos/modus-themes

Fix document on how to change pdf-tools backdrop v1 APPLIED

Utkarsh Singh: 1
 Fix document on how to change pdf-tools backdrop

 1 files changed, 12 insertions(+), 6 deletions(-)
Thank you!  I installed the patch and updated the manual's web page.
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~protesilaos/modus-themes/patches/37902/mbox | git am -3
Learn more about email & git

[PATCH] Fix document on how to change pdf-tools backdrop Export this patch

---
 doc/modus-themes.org | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/doc/modus-themes.org b/doc/modus-themes.org
index 1273fd8..dce5183 100644
--- a/doc/modus-themes.org
+++ b/doc/modus-themes.org
@@ -3022,9 +3022,12 @@ To remap the buffer's backdrop, we start with a function like this one:

#+begin_src emacs-lisp
(defun my-pdf-tools-backdrop ()
  (face-remap-add-relative
   'default
   `(:background ,(modus-themes-color 'bg-alt))))
  (let ((cur-palette (if (eq (car custom-enabled-themes) 'modus-operandi)
			 modus-operandi-palette
		       modus-vivendi-palette)))
    (face-remap-add-relative
     'default
     `(:background ,(car (alist-get 'bg-dim cur-palette))))))

(add-hook 'pdf-tools-enabled-hook #'my-pdf-tools-backdrop)
#+end_src
@@ -3043,9 +3046,12 @@ at something like the following, which builds on the above example:

#+begin_src emacs-lisp
(defun my-pdf-tools-backdrop ()
  (face-remap-add-relative
   'default
   `(:background ,(modus-themes-color 'bg-alt))))
  (let ((cur-palette (if (eq (car custom-enabled-themes) 'modus-operandi)
			 modus-operandi-palette
		       modus-vivendi-palette)))
    (face-remap-add-relative
     'default
     `(:background ,(car (alist-get 'bg-dim cur-palette))))))

(defun my-pdf-tools-midnight-mode-toggle ()
  (when (derived-mode-p 'pdf-view-mode)
-- 
2.39.0
Thank you Utkarsh!  I installed your patch and pushed the change.

The code will need to be updated though.  I think it is easier to use
'modus-themes-with-colors' in this case.  But I will have to install
pdf-tools to try this again.  Not sure if I can do it today, though I
will give it a try as soon as possible.