Support transparency toggling
The kbd, <super>-u, is modelled after iTerm's <super>-u kbd for toggling transparency.
This commit is contained in:
parent
27b1a74d07
commit
ad496994c8
1 changed files with 12 additions and 2 deletions
|
@ -57,8 +57,18 @@
|
|||
(setq initial-buffer-choice wpc/current-project)
|
||||
|
||||
;; transparent Emacs
|
||||
(set-frame-parameter (selected-frame) 'alpha '(100 . 100))
|
||||
(add-to-list 'default-frame-alist '(alpha . (100 . 100)))
|
||||
(set-frame-parameter (selected-frame) 'alpha '(90 . 90))
|
||||
(setq frame-transparent? t)
|
||||
|
||||
(defun wpc/toggle-transparency ()
|
||||
"Toggle the frame transparency."
|
||||
(interactive)
|
||||
(set-frame-parameter (selected-frame) 'alpha '(90 . 90))
|
||||
(let ((alpha (if frame-transparent? 100 90)))
|
||||
(set-frame-parameter (selected-frame) 'alpha `(,alpha . ,alpha)))
|
||||
(setq frame-transparent? (not frame-transparent?)))
|
||||
|
||||
(general-def "s-u" #'wpc/toggle-transparency)
|
||||
|
||||
;; premium Emacs themes
|
||||
(use-package doom-themes
|
||||
|
|
Loading…
Reference in a new issue