[Emacs] Simplify background transparency settings

This commit is contained in:
Lucien Cartier-Tilet 2022-05-17 17:24:54 +02:00
parent 8971a5b868
commit c7519cfd9d
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -355,13 +355,11 @@ character of three dots. Lets make it so:
(setq truncate-string-ellipsis "…") (setq truncate-string-ellipsis "…")
#+end_src #+end_src
Thanks to [[https://github.com/TheVaffel/emacs][this fork]] of Emacs, it is now possible to set some With Emacs 29.0.50 onwards, a new frame parameter exists:
transparency to the background of Emacs only and not to the entire ~alpha-background~. Unlike ~alpha~, this frame parameter only makes Emacs
frame. background transparent, excluding images and text.
#+begin_src emacs-lisp #+begin_src emacs-lisp
(add-hook 'server-after-make-frame-hook (lambda () (add-to-list 'default-frame-alist '(alpha-background . 0.7))
(set-frame-parameter (selected-frame)
'alpha-background 0.7)))
#+end_src #+end_src
*** Modeline Modules *** Modeline Modules
@ -3875,6 +3873,7 @@ The complete configuration for the ~exwm~ package can be found below.
(require 'exwm-config) (require 'exwm-config)
(setq exwm-workspace-number 6) (setq exwm-workspace-number 6)
:config :config
(set-frame-parameter (selected-frame) 'alpha-background 0.7)
<<exwm-randr>> <<exwm-randr>>
<<exwm-buffers-name>> <<exwm-buffers-name>>