From 162b8dc81f1b4e19190e96e02fcdb09cc5dd2b28 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 13 Sep 2018 11:09:48 -0400 Subject: [PATCH] Add doom/set-frame-opacity command I use this to play videos behind Emacs while I work. --- core/autoload/ui.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index faddcfe67..4201549a8 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -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