From 25143301014c65973745fda47df225b2c1d2decc Mon Sep 17 00:00:00 2001 From: Christopher James Hayward Date: Thu, 13 May 2021 18:09:24 -0400 Subject: [PATCH] Add a custom function to toggle frame transparency --- modules/interface.org | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/modules/interface.org b/modules/interface.org index 9ae96c9..0a57fd6 100644 --- a/modules/interface.org +++ b/modules/interface.org @@ -30,6 +30,29 @@ There's a lot of occasions Emacs asks to input text to match a file name in a di :config (ivy-mode 1)) #+end_src +** Frame transparency + +TODO + +#+begin_src emacs-lisp +(defun dotfiles/toggle-transparency () + (interactive) + (let ((alpha (frame-parameter nil 'alpha))) + (set-frame-parameter nil 'alpha + (if (eql (cond ((numberp alpha) alpha) + ((numberp (cdr alpha)) (cdr alpha)) + ((numberp (cadr alpha)) (cadr alpha))) + 100) + '(85 . 50) '(100 . 100))))) +#+end_src + +Toggle frame transparency with =SPC t r=. + +#+begin_src emacs-lisp +(dotfiles/leader + "tr" '(dotfiles/toggle-transparency :which-key "Toggle transparency")) +#+end_src + ** Popup selection frame + Display =ivy= completions in a popup buffer