Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created June 10, 2010 19:06
Show Gist options
  • Save abuiles/433474 to your computer and use it in GitHub Desktop.
Save abuiles/433474 to your computer and use it in GitHub Desktop.
;;Sets transparency of the background
;;(set-frame-parameter (selected-frame) 'alpha '(<active> [<inactive>]))
;; (set-frame-parameter (selected-frame) 'alpha '(60 20))
(add-to-list 'default-frame-alist '(alpha 60 20))
(eval-when-compile (require 'cl))
(defun toggle-transparency ()
(interactive)
(if (/=
(cadr (find 'alpha (frame-parameters nil) :key #'car))
100)
(set-frame-parameter nil 'alpha '(100 100))
(set-frame-parameter nil 'alpha '(60 20))))
(global-set-key (kbd "C-c t") 'toggle-transparency)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment