How to make everything except the text transparent?
I do not know for sure if the text becomes transparent, but this is what I use and I think works pretty well. However, if your font color is white, and you are reading a pdf with a white background color, even non-transparent text is going to be pretty hard to read.
(setq transparency_level 0) (defun my:change_transparency () "Toggles transparency of Emacs between 3 settings (none, mild, moderate)." (interactive) (if (equal transparency_level 0) (progn (set-frame-parameter (selected-frame) 'alpha '(75 . 85)) (setq transparency_level 1)) (if (equal transparency_level 1) (progn (set-frame-parameter (selected-frame) 'alpha '(50 . 85)) (setq transparency_level 2)) (if (equal transparency_level 2) (progn (set-frame-parameter (selected-frame) 'alpha '(100 . 85)) (setq transparency_level 0))) ))) (define-key global-map (kbd "C-c t") 'my:change_transparency)
If you add the code above to your
init.el file or equivalent, you can use
C-c t to toggle between transparency levels. If you think the transparency is too low, you can change the number
50 above to
30, for example, and that will make the frame more transparent.
I use this when I am writing things in emacs and need to read some pdf or website. This way I do not need to alt-tab. I think it works pretty well, hope it helps!
Edit 2: When setting the emacs transparency there are two numbers. The first is the transparency of emacs when it is active, and the second is when it is inactive (like when you alt-tab to another application).
The screenshot below shows an Emacs that is inactive, notice that it is still transparent (not much), and you can see my calendar application open in the background. Emacs is inactive because I changed my focus to the pdf reader.