Skip to content

Instantly share code, notes, and snippets.

@kosugi
Created December 8, 2013 07:39
Show Gist options
  • Select an option

  • Save kosugi/7854361 to your computer and use it in GitHub Desktop.

Select an option

Save kosugi/7854361 to your computer and use it in GitHub Desktop.
(defun frame-alpha-offset (d)
(let* ((a (frame-parameter nil 'alpha))
(b (+ d (if (integerp a) a 100)))
(c (cond ((< b 20) 20)
((> b 100) 100)
(t b))))
(set-frame-parameter nil 'alpha c)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment