Enable emacs transparency; update gitignore

This commit is contained in:
Tommy Harris 2020-12-20 10:47:57 -07:00
parent f6a9929f44
commit 9c5756b72f
Signed by: tobraha
GPG Key ID: 93769A4F97AE33E9
2 changed files with 20 additions and 1 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
*~
*~
private/

View File

@ -358,6 +358,24 @@ before packages are loaded. If you are unsure, you should try in setting them in
;; use emacs for gpg pin entry, not local gpg agent
(setq epa-pinentry-mode 'loopback)
;; set transparency
(set-frame-parameter (selected-frame) 'alpha '(90 . 50))
(add-to-list 'default-frame-alist '(alpha . (90 . 50)))
;; toggle transparency with: C-c t
(defun 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))
;; Also handle undocumented (<active> <inactive>) form.
((numberp (cadr alpha)) (cadr alpha)))
100)
'(85 . 50) '(100 . 100)))))
(global-set-key (kbd "C-c t") 'toggle-transparency)
)
(defun dotspacemacs/user-config ()