Add doom/set-frame-opacity command

I use this to play videos behind Emacs while I work.
This commit is contained in:
Henrik Lissner 2018-09-13 11:09:48 -04:00
parent a1440f8d66
commit 162b8dc81f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -150,6 +150,17 @@ set."
(set-frame-font doom-font t))
(doom|init-fonts))
;;;###autoload
(defun doom/set-frame-opacity (opacity)
"Interactively change the current frame's opacity.
OPACITY is an integer between 0 to 100, inclusive."
(interactive
(list (read-number "Opacity (0-100): "
(or (frame-parameter nil 'alpha)
100))))
(set-frame-parameter nil 'alpha opacity))
;;
;; Modes