X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Felisp%2Futilities.el;h=7304762f9926d7adae5c0aba2315240a94a3b0ab;hb=4392425517272acf008f7ee8957ddbc645d7e484;hp=aeb5a5d6192b086bde01ec002fe29e8ffd08c386;hpb=ac7b7c23682b4675948cd015f2fb735a05f9725f;p=dotfiles.git diff --git a/emacs.d/elisp/utilities.el b/emacs.d/elisp/utilities.el index aeb5a5d..7304762 100644 --- a/emacs.d/elisp/utilities.el +++ b/emacs.d/elisp/utilities.el @@ -56,6 +56,21 @@ one window, window undo" (kill-region (point) (mark)) (backward-kill-word 1))) +;; https://www.emacswiki.org/emacs/TransparentEmacs +(defun sd/transparency (value) + "Sets the transparency of the frame window with a value from 0 to 100." + (interactive "nTransparency Value 0 - 100 opague:(default 80) ") + (set-frame-parameter (select-frame) 'alpha value)) + +(defun sd/toggle-transparency () + "Enable or disable transparency" + (interactive) + (let ((alpha (frame-parameter nil 'alpha))) + (set-frame-parameter nil 'alpha + (if (eql alpha 80) + 100 + 80)))) + (provide 'utilities)